//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension DataSync {
    // MARK: Enums

    public enum AgentStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case offline = "OFFLINE"
        case online = "ONLINE"
        public var description: String { return self.rawValue }
    }

    public enum Atime: String, CustomStringConvertible, Codable, _SotoSendable {
        case bestEffort = "BEST_EFFORT"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum EfsInTransitEncryption: String, CustomStringConvertible, Codable, _SotoSendable {
        case none = "NONE"
        case tls12 = "TLS1_2"
        public var description: String { return self.rawValue }
    }

    public enum EndpointType: String, CustomStringConvertible, Codable, _SotoSendable {
        case `public` = "PUBLIC"
        case fips = "FIPS"
        case privateLink = "PRIVATE_LINK"
        public var description: String { return self.rawValue }
    }

    public enum FilterType: String, CustomStringConvertible, Codable, _SotoSendable {
        case simplePattern = "SIMPLE_PATTERN"
        public var description: String { return self.rawValue }
    }

    public enum Gid: String, CustomStringConvertible, Codable, _SotoSendable {
        case both = "BOTH"
        case intValue = "INT_VALUE"
        case name = "NAME"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum HdfsAuthenticationType: String, CustomStringConvertible, Codable, _SotoSendable {
        case kerberos = "KERBEROS"
        case simple = "SIMPLE"
        public var description: String { return self.rawValue }
    }

    public enum HdfsDataTransferProtection: String, CustomStringConvertible, Codable, _SotoSendable {
        case authentication = "AUTHENTICATION"
        case disabled = "DISABLED"
        case integrity = "INTEGRITY"
        case privacy = "PRIVACY"
        public var description: String { return self.rawValue }
    }

    public enum HdfsRpcProtection: String, CustomStringConvertible, Codable, _SotoSendable {
        case authentication = "AUTHENTICATION"
        case disabled = "DISABLED"
        case integrity = "INTEGRITY"
        case privacy = "PRIVACY"
        public var description: String { return self.rawValue }
    }

    public enum LocationFilterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case creationTime = "CreationTime"
        case locationType = "LocationType"
        case locationUri = "LocationUri"
        public var description: String { return self.rawValue }
    }

    public enum LogLevel: String, CustomStringConvertible, Codable, _SotoSendable {
        case basic = "BASIC"
        case off = "OFF"
        case transfer = "TRANSFER"
        public var description: String { return self.rawValue }
    }

    public enum Mtime: String, CustomStringConvertible, Codable, _SotoSendable {
        case none = "NONE"
        case preserve = "PRESERVE"
        public var description: String { return self.rawValue }
    }

    public enum NfsVersion: String, CustomStringConvertible, Codable, _SotoSendable {
        case automatic = "AUTOMATIC"
        case nfs3 = "NFS3"
        case nfs40 = "NFS4_0"
        case nfs41 = "NFS4_1"
        public var description: String { return self.rawValue }
    }

    public enum ObjectStorageServerProtocol: String, CustomStringConvertible, Codable, _SotoSendable {
        case http = "HTTP"
        case https = "HTTPS"
        public var description: String { return self.rawValue }
    }

    public enum ObjectTags: String, CustomStringConvertible, Codable, _SotoSendable {
        case none = "NONE"
        case preserve = "PRESERVE"
        public var description: String { return self.rawValue }
    }

    public enum Operator: String, CustomStringConvertible, Codable, _SotoSendable {
        case `in` = "In"
        case beginsWith = "BeginsWith"
        case contains = "Contains"
        case eq = "Equals"
        case ge = "GreaterThanOrEqual"
        case gt = "GreaterThan"
        case le = "LessThanOrEqual"
        case lt = "LessThan"
        case ne = "NotEquals"
        case notContains = "NotContains"
        public var description: String { return self.rawValue }
    }

    public enum OverwriteMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case always = "ALWAYS"
        case never = "NEVER"
        public var description: String { return self.rawValue }
    }

    public enum PhaseStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case error = "ERROR"
        case pending = "PENDING"
        case success = "SUCCESS"
        public var description: String { return self.rawValue }
    }

    public enum PosixPermissions: String, CustomStringConvertible, Codable, _SotoSendable {
        case none = "NONE"
        case preserve = "PRESERVE"
        public var description: String { return self.rawValue }
    }

    public enum PreserveDeletedFiles: String, CustomStringConvertible, Codable, _SotoSendable {
        case preserve = "PRESERVE"
        case remove = "REMOVE"
        public var description: String { return self.rawValue }
    }

    public enum PreserveDevices: String, CustomStringConvertible, Codable, _SotoSendable {
        case none = "NONE"
        case preserve = "PRESERVE"
        public var description: String { return self.rawValue }
    }

    public enum S3StorageClass: String, CustomStringConvertible, Codable, _SotoSendable {
        case deepArchive = "DEEP_ARCHIVE"
        case glacier = "GLACIER"
        case glacierInstantRetrieval = "GLACIER_INSTANT_RETRIEVAL"
        case intelligentTiering = "INTELLIGENT_TIERING"
        case onezoneIa = "ONEZONE_IA"
        case outposts = "OUTPOSTS"
        case standard = "STANDARD"
        case standardIa = "STANDARD_IA"
        public var description: String { return self.rawValue }
    }

    public enum SmbSecurityDescriptorCopyFlags: String, CustomStringConvertible, Codable, _SotoSendable {
        case none = "NONE"
        case ownerDacl = "OWNER_DACL"
        case ownerDaclSacl = "OWNER_DACL_SACL"
        public var description: String { return self.rawValue }
    }

    public enum SmbVersion: String, CustomStringConvertible, Codable, _SotoSendable {
        case automatic = "AUTOMATIC"
        case smb2 = "SMB2"
        case smb3 = "SMB3"
        public var description: String { return self.rawValue }
    }

    public enum TaskExecutionStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case error = "ERROR"
        case launching = "LAUNCHING"
        case preparing = "PREPARING"
        case queued = "QUEUED"
        case success = "SUCCESS"
        case transferring = "TRANSFERRING"
        case verifying = "VERIFYING"
        public var description: String { return self.rawValue }
    }

    public enum TaskFilterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case creationTime = "CreationTime"
        case locationId = "LocationId"
        public var description: String { return self.rawValue }
    }

    public enum TaskQueueing: String, CustomStringConvertible, Codable, _SotoSendable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum TaskStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case available = "AVAILABLE"
        case creating = "CREATING"
        case queued = "QUEUED"
        case running = "RUNNING"
        case unavailable = "UNAVAILABLE"
        public var description: String { return self.rawValue }
    }

    public enum TransferMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case all = "ALL"
        case changed = "CHANGED"
        public var description: String { return self.rawValue }
    }

    public enum Uid: String, CustomStringConvertible, Codable, _SotoSendable {
        case both = "BOTH"
        case intValue = "INT_VALUE"
        case name = "NAME"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum VerifyMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case none = "NONE"
        case onlyFilesTransferred = "ONLY_FILES_TRANSFERRED"
        case pointInTimeConsistent = "POINT_IN_TIME_CONSISTENT"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AgentListEntry: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the agent.
        public let agentArn: String?
        /// The name of the agent.
        public let name: String?
        /// The status of the agent.
        public let status: AgentStatus?

        public init(agentArn: String? = nil, name: String? = nil, status: AgentStatus? = nil) {
            self.agentArn = agentArn
            self.name = name
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
            case name = "Name"
            case status = "Status"
        }
    }

    public struct CancelTaskExecutionRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the task execution to stop.
        public let taskExecutionArn: String

        public init(taskExecutionArn: String) {
            self.taskExecutionArn = taskExecutionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, max: 128)
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}/execution/exec-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct CancelTaskExecutionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CreateAgentRequest: AWSEncodableShape {
        /// Your agent activation key. You can get the activation key either by sending an HTTP GET request with redirects that enable you to get the agent IP address (port 80). Alternatively, you can get it from the DataSync console. The redirect URL returned in the response provides you the activation key for your agent in the query string parameter activationKey. It might also include other activation-related parameters; however, these are merely defaults. The arguments you pass to this API call determine the actual configuration of your agent. For more information, see Activating an Agent in the DataSync User Guide.
        public let activationKey: String
        /// The name you configured for your agent. This value is a text reference that is used to identify the agent in the console.
        public let agentName: String?
        /// The ARNs of the security groups used to protect your data transfer task subnets. See SecurityGroupArns.
        public let securityGroupArns: [String]?
        /// The Amazon Resource Names (ARNs) of the subnets in which DataSync will create elastic network interfaces for each data transfer task. The agent that runs a task must be private. When you start a task that is associated with an agent created in a VPC, or one that has access to an IP address in a VPC, then the task is also private. In this case, DataSync creates four network interfaces for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four network interfaces.
        public let subnetArns: [String]?
        /// The key-value pair that represents the tag that you want to associate with the agent. The value can be an empty string. This value helps you manage, filter, and search for your agents.  Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @.
        public let tags: [TagListEntry]?
        /// The ID of the VPC (virtual private cloud) endpoint that the agent has access to. This is the client-side VPC endpoint, also called a PrivateLink. If you don't have a PrivateLink VPC endpoint, see Creating a VPC Endpoint Service Configuration in the Amazon VPC User Guide. VPC endpoint ID looks like this: vpce-01234d5aff67890e1.
        public let vpcEndpointId: String?

        public init(activationKey: String, agentName: String? = nil, securityGroupArns: [String]? = nil, subnetArns: [String]? = nil, tags: [TagListEntry]? = nil, vpcEndpointId: String? = nil) {
            self.activationKey = activationKey
            self.agentName = agentName
            self.securityGroupArns = securityGroupArns
            self.subnetArns = subnetArns
            self.tags = tags
            self.vpcEndpointId = vpcEndpointId
        }

        public func validate(name: String) throws {
            try self.validate(self.activationKey, name: "activationKey", parent: name, max: 29)
            try self.validate(self.activationKey, name: "activationKey", parent: name, pattern: "^[A-Z0-9]{5}(-[A-Z0-9]{5}){4}$")
            try self.validate(self.agentName, name: "agentName", parent: name, max: 256)
            try self.validate(self.agentName, name: "agentName", parent: name, min: 1)
            try self.validate(self.agentName, name: "agentName", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:@/-]+$")
            try self.securityGroupArns?.forEach {
                try validate($0, name: "securityGroupArns[]", parent: name, max: 128)
                try validate($0, name: "securityGroupArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:security-group/.*$")
            }
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, max: 1)
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, min: 1)
            try self.subnetArns?.forEach {
                try validate($0, name: "subnetArns[]", parent: name, max: 128)
                try validate($0, name: "subnetArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:subnet/.*$")
            }
            try self.validate(self.subnetArns, name: "subnetArns", parent: name, max: 1)
            try self.validate(self.subnetArns, name: "subnetArns", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.vpcEndpointId, name: "vpcEndpointId", parent: name, pattern: "^vpce-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case activationKey = "ActivationKey"
            case agentName = "AgentName"
            case securityGroupArns = "SecurityGroupArns"
            case subnetArns = "SubnetArns"
            case tags = "Tags"
            case vpcEndpointId = "VpcEndpointId"
        }
    }

    public struct CreateAgentResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the agent. Use the ListAgents operation to return a list of agents for your account and Amazon Web Services Region.
        public let agentArn: String?

        public init(agentArn: String? = nil) {
            self.agentArn = agentArn
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
        }
    }

    public struct CreateLocationEfsRequest: AWSEncodableShape {
        /// Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.
        public let accessPointArn: String?
        /// Specifies the subnet and security groups DataSync uses to access your Amazon EFS file system.
        public let ec2Config: Ec2Config
        /// Specifies the ARN for the Amazon EFS file system.
        public let efsFilesystemArn: String
        /// Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
        public let fileSystemAccessRoleArn: String?
        /// Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it copies data to or from the Amazon EFS file system. If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.
        public let inTransitEncryption: EfsInTransitEncryption?
        /// Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location). By default, DataSync uses the root directory, but you can also include subdirectories.  You must specify a value with forward slashes (for example, /path/to/folder).
        public let subdirectory: String?
        /// Specifies the key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.
        public let tags: [TagListEntry]?

        public init(accessPointArn: String? = nil, ec2Config: Ec2Config, efsFilesystemArn: String, fileSystemAccessRoleArn: String? = nil, inTransitEncryption: EfsInTransitEncryption? = nil, subdirectory: String? = nil, tags: [TagListEntry]? = nil) {
            self.accessPointArn = accessPointArn
            self.ec2Config = ec2Config
            self.efsFilesystemArn = efsFilesystemArn
            self.fileSystemAccessRoleArn = fileSystemAccessRoleArn
            self.inTransitEncryption = inTransitEncryption
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.accessPointArn, name: "accessPointArn", parent: name, max: 128)
            try self.validate(self.accessPointArn, name: "accessPointArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):elasticfilesystem:[a-z\\-0-9]+:[0-9]{12}:access-point/fsap-[0-9a-f]{8,40}$")
            try self.ec2Config.validate(name: "\(name).ec2Config")
            try self.validate(self.efsFilesystemArn, name: "efsFilesystemArn", parent: name, max: 128)
            try self.validate(self.efsFilesystemArn, name: "efsFilesystemArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):elasticfilesystem:[a-z\\-0-9]*:[0-9]{12}:file-system/fs-.*$")
            try self.validate(self.fileSystemAccessRoleArn, name: "fileSystemAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.fileSystemAccessRoleArn, name: "fileSystemAccessRoleArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):iam::[0-9]{12}:role/.*$")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\p{Zs}]*$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case accessPointArn = "AccessPointArn"
            case ec2Config = "Ec2Config"
            case efsFilesystemArn = "EfsFilesystemArn"
            case fileSystemAccessRoleArn = "FileSystemAccessRoleArn"
            case inTransitEncryption = "InTransitEncryption"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationEfsResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon EFS file system location that you create.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationFsxLustreRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) for the FSx for Lustre file system.
        public let fsxFilesystemArn: String
        /// The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.
        public let securityGroupArns: [String]
        /// A subdirectory in the location's path. This subdirectory in the FSx for Lustre file system is used to read data from the FSx for Lustre source location or write data to the FSx for Lustre  destination.
        public let subdirectory: String?
        /// The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.
        public let tags: [TagListEntry]?

        public init(fsxFilesystemArn: String, securityGroupArns: [String], subdirectory: String? = nil, tags: [TagListEntry]? = nil) {
            self.fsxFilesystemArn = fsxFilesystemArn
            self.securityGroupArns = securityGroupArns
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.fsxFilesystemArn, name: "fsxFilesystemArn", parent: name, max: 128)
            try self.validate(self.fsxFilesystemArn, name: "fsxFilesystemArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):fsx:[a-z\\-0-9]*:[0-9]{12}:file-system/fs-.*$")
            try self.securityGroupArns.forEach {
                try validate($0, name: "securityGroupArns[]", parent: name, max: 128)
                try validate($0, name: "securityGroupArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:security-group/.*$")
            }
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, max: 5)
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, min: 1)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case fsxFilesystemArn = "FsxFilesystemArn"
            case securityGroupArns = "SecurityGroupArns"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationFsxLustreResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the FSx for Lustre file system location that's created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationFsxOntapRequest: AWSEncodableShape {
        public let `protocol`: FsxProtocol
        /// Specifies the Amazon EC2 security groups that provide access to your file system's preferred subnet. The security groups must allow outbound traffic on the following ports (depending on the protocol you use):    Network File System (NFS): TCP ports 111, 635, and 2049    Server Message Block (SMB): TCP port 445   Your file system's security groups must also allow inbound traffic on the same ports.
        public let securityGroupArns: [String]
        /// Specifies the ARN of the storage virtual machine (SVM) on your file system where you're copying data to or from.
        public let storageVirtualMachineArn: String
        /// Specifies the junction path (also known as a mount point) in the SVM volume where you're copying data to or from (for example, /vol1).  Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.
        public let subdirectory: String?
        /// Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.
        public let tags: [TagListEntry]?

        public init(protocol: FsxProtocol, securityGroupArns: [String], storageVirtualMachineArn: String, subdirectory: String? = nil, tags: [TagListEntry]? = nil) {
            self.`protocol` = `protocol`
            self.securityGroupArns = securityGroupArns
            self.storageVirtualMachineArn = storageVirtualMachineArn
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.`protocol`.validate(name: "\(name).`protocol`")
            try self.securityGroupArns.forEach {
                try validate($0, name: "securityGroupArns[]", parent: name, max: 128)
                try validate($0, name: "securityGroupArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:security-group/.*$")
            }
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, max: 5)
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, min: 1)
            try self.validate(self.storageVirtualMachineArn, name: "storageVirtualMachineArn", parent: name, max: 162)
            try self.validate(self.storageVirtualMachineArn, name: "storageVirtualMachineArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):fsx:[a-z\\-0-9]+:[0-9]{12}:storage-virtual-machine/fs-[0-9a-f]+/svm-[0-9a-f]{17,}$")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 255)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[^\\u0000\\u0085\\u2028\\u2029\\r\\n]{1,255}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case `protocol` = "Protocol"
            case securityGroupArns = "SecurityGroupArns"
            case storageVirtualMachineArn = "StorageVirtualMachineArn"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationFsxOntapResponse: AWSDecodableShape {
        /// Specifies the ARN of the FSx for ONTAP file system location that you create.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationFsxOpenZfsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the FSx for OpenZFS file system.
        public let fsxFilesystemArn: String
        /// The type of protocol that DataSync uses to access your file system.
        public let `protocol`: FsxProtocol
        /// The ARNs of the security groups that are used to configure the FSx for OpenZFS file system.
        public let securityGroupArns: [String]
        /// A subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).
        public let subdirectory: String?
        /// The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.
        public let tags: [TagListEntry]?

        public init(fsxFilesystemArn: String, protocol: FsxProtocol, securityGroupArns: [String], subdirectory: String? = nil, tags: [TagListEntry]? = nil) {
            self.fsxFilesystemArn = fsxFilesystemArn
            self.`protocol` = `protocol`
            self.securityGroupArns = securityGroupArns
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.fsxFilesystemArn, name: "fsxFilesystemArn", parent: name, max: 128)
            try self.validate(self.fsxFilesystemArn, name: "fsxFilesystemArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):fsx:[a-z\\-0-9]*:[0-9]{12}:file-system/fs-.*$")
            try self.`protocol`.validate(name: "\(name).`protocol`")
            try self.securityGroupArns.forEach {
                try validate($0, name: "securityGroupArns[]", parent: name, max: 128)
                try validate($0, name: "securityGroupArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:security-group/.*$")
            }
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, max: 5)
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, min: 1)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[^\\u0000\\u0085\\u2028\\u2029\\r\\n]{1,4096}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case fsxFilesystemArn = "FsxFilesystemArn"
            case `protocol` = "Protocol"
            case securityGroupArns = "SecurityGroupArns"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationFsxOpenZfsResponse: AWSDecodableShape {
        /// The ARN of the FSx for OpenZFS file system location that you created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationFsxWindowsRequest: AWSEncodableShape {
        /// Specifies the name of the Windows domain that the FSx for Windows File Server belongs to.
        public let domain: String?
        /// Specifies the Amazon Resource Name (ARN) for the FSx for Windows File Server file system.
        public let fsxFilesystemArn: String
        /// Specifies the password of the user who has the permissions to access files and folders in the file system.
        public let password: String
        /// Specifies the ARNs of the security groups that provide access to your file system's preferred subnet.  If you choose a security group that doesn't allow connections from within itself, do one of the following:   Configure the security group to allow it to communicate within itself.   Choose a different security group that can communicate with the mount target's security group.
        public let securityGroupArns: [String]
        /// Specifies a mount path for your file system using forward slashes. This is where DataSync reads or writes data (depending on if this is a source or destination location).
        public let subdirectory: String?
        /// Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.
        public let tags: [TagListEntry]?
        /// Specifies the user who has the permissions to access files and folders in the file system. For information about choosing a user name that ensures sufficient permissions to files, folders, and metadata, see user.
        public let user: String

        public init(domain: String? = nil, fsxFilesystemArn: String, password: String, securityGroupArns: [String], subdirectory: String? = nil, tags: [TagListEntry]? = nil, user: String) {
            self.domain = domain
            self.fsxFilesystemArn = fsxFilesystemArn
            self.password = password
            self.securityGroupArns = securityGroupArns
            self.subdirectory = subdirectory
            self.tags = tags
            self.user = user
        }

        public func validate(name: String) throws {
            try self.validate(self.domain, name: "domain", parent: name, max: 253)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[A-Za-z0-9]((\\.|-+)?[A-Za-z0-9]){0,252}$")
            try self.validate(self.fsxFilesystemArn, name: "fsxFilesystemArn", parent: name, max: 128)
            try self.validate(self.fsxFilesystemArn, name: "fsxFilesystemArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):fsx:[a-z\\-0-9]*:[0-9]{12}:file-system/fs-.*$")
            try self.validate(self.password, name: "password", parent: name, max: 104)
            try self.validate(self.password, name: "password", parent: name, pattern: "^.{0,104}$")
            try self.securityGroupArns.forEach {
                try validate($0, name: "securityGroupArns[]", parent: name, max: 128)
                try validate($0, name: "securityGroupArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:security-group/.*$")
            }
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, max: 5)
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, min: 1)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.user, name: "user", parent: name, max: 104)
            try self.validate(self.user, name: "user", parent: name, pattern: "^[^\\x5B\\x5D\\\\/:;|=,+*?]{1,104}$")
        }

        private enum CodingKeys: String, CodingKey {
            case domain = "Domain"
            case fsxFilesystemArn = "FsxFilesystemArn"
            case password = "Password"
            case securityGroupArns = "SecurityGroupArns"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
            case user = "User"
        }
    }

    public struct CreateLocationFsxWindowsResponse: AWSDecodableShape {
        /// The ARN of the FSx for Windows File Server file system location you created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationHdfsRequest: AWSEncodableShape {
        /// The Amazon Resource Names (ARNs) of the agents that are used to connect to the HDFS cluster.
        public let agentArns: [String]
        /// The type of authentication used to determine the identity of the user.
        public let authenticationType: HdfsAuthenticationType
        /// The size of data blocks to write into the HDFS cluster. The block size must be a multiple of 512 bytes. The default block size is 128 mebibytes (MiB).
        public let blockSize: Int?
        /// The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address. If you're using the CLI, it performs base64 encoding for you. Otherwise, provide the base64-encoded text.   If KERBEROS is specified for AuthenticationType, this parameter is required.
        public let kerberosKeytab: AWSBase64Data?
        /// The krb5.conf file that contains the Kerberos configuration information. You can load the krb5.conf file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.   If KERBEROS is specified for AuthenticationType, this parameter is required.
        public let kerberosKrb5Conf: AWSBase64Data?
        /// The Kerberos principal with access to the files and folders on the HDFS cluster.   If KERBEROS is specified for AuthenticationType, this parameter is required.
        public let kerberosPrincipal: String?
        /// The URI of the HDFS cluster's Key Management Server (KMS).
        public let kmsKeyProviderUri: String?
        /// The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.
        public let nameNodes: [HdfsNameNode]
        /// The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) cluster. If QopConfiguration isn't specified, RpcProtection and DataTransferProtection default to PRIVACY. If you set RpcProtection or DataTransferProtection, the other parameter assumes the same value.
        public let qopConfiguration: QopConfiguration?
        /// The number of DataNodes to replicate the data to when writing to the HDFS cluster. By default, data is replicated to three DataNodes.
        public let replicationFactor: Int?
        /// The user name used to identify the client on the host operating system.   If SIMPLE is specified for AuthenticationType, this parameter is required.
        public let simpleUser: String?
        /// A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster. If the subdirectory isn't specified, it will default to /.
        public let subdirectory: String?
        /// The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.
        public let tags: [TagListEntry]?

        public init(agentArns: [String], authenticationType: HdfsAuthenticationType, blockSize: Int? = nil, kerberosKeytab: AWSBase64Data? = nil, kerberosKrb5Conf: AWSBase64Data? = nil, kerberosPrincipal: String? = nil, kmsKeyProviderUri: String? = nil, nameNodes: [HdfsNameNode], qopConfiguration: QopConfiguration? = nil, replicationFactor: Int? = nil, simpleUser: String? = nil, subdirectory: String? = nil, tags: [TagListEntry]? = nil) {
            self.agentArns = agentArns
            self.authenticationType = authenticationType
            self.blockSize = blockSize
            self.kerberosKeytab = kerberosKeytab
            self.kerberosKrb5Conf = kerberosKrb5Conf
            self.kerberosPrincipal = kerberosPrincipal
            self.kmsKeyProviderUri = kmsKeyProviderUri
            self.nameNodes = nameNodes
            self.qopConfiguration = qopConfiguration
            self.replicationFactor = replicationFactor
            self.simpleUser = simpleUser
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.agentArns.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
            try self.validate(self.blockSize, name: "blockSize", parent: name, max: 1_073_741_824)
            try self.validate(self.blockSize, name: "blockSize", parent: name, min: 1_048_576)
            try self.validate(self.kerberosKeytab, name: "kerberosKeytab", parent: name, max: 65536)
            try self.validate(self.kerberosKrb5Conf, name: "kerberosKrb5Conf", parent: name, max: 131_072)
            try self.validate(self.kerberosPrincipal, name: "kerberosPrincipal", parent: name, max: 256)
            try self.validate(self.kerberosPrincipal, name: "kerberosPrincipal", parent: name, min: 1)
            try self.validate(self.kerberosPrincipal, name: "kerberosPrincipal", parent: name, pattern: "^.+$")
            try self.validate(self.kmsKeyProviderUri, name: "kmsKeyProviderUri", parent: name, max: 255)
            try self.validate(self.kmsKeyProviderUri, name: "kmsKeyProviderUri", parent: name, min: 1)
            try self.validate(self.kmsKeyProviderUri, name: "kmsKeyProviderUri", parent: name, pattern: "^kms:\\/\\/http[s]?@(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9])(;(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9]))*:[0-9]{1,5}\\/kms$")
            try self.nameNodes.forEach {
                try $0.validate(name: "\(name).nameNodes[]")
            }
            try self.validate(self.nameNodes, name: "nameNodes", parent: name, min: 1)
            try self.validate(self.replicationFactor, name: "replicationFactor", parent: name, max: 512)
            try self.validate(self.replicationFactor, name: "replicationFactor", parent: name, min: 1)
            try self.validate(self.simpleUser, name: "simpleUser", parent: name, max: 256)
            try self.validate(self.simpleUser, name: "simpleUser", parent: name, min: 1)
            try self.validate(self.simpleUser, name: "simpleUser", parent: name, pattern: "^[_.A-Za-z0-9][-_.A-Za-z0-9]*$")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case authenticationType = "AuthenticationType"
            case blockSize = "BlockSize"
            case kerberosKeytab = "KerberosKeytab"
            case kerberosKrb5Conf = "KerberosKrb5Conf"
            case kerberosPrincipal = "KerberosPrincipal"
            case kmsKeyProviderUri = "KmsKeyProviderUri"
            case nameNodes = "NameNodes"
            case qopConfiguration = "QopConfiguration"
            case replicationFactor = "ReplicationFactor"
            case simpleUser = "SimpleUser"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationHdfsResponse: AWSDecodableShape {
        /// The ARN of the source HDFS cluster location that's created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationNfsRequest: AWSEncodableShape {
        /// The NFS mount options that DataSync can use to mount your NFS share.
        public let mountOptions: NfsMountOptions?
        /// Contains a list of Amazon Resource Names (ARNs) of agents that are used to connect to an NFS server.  If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information.
        public let onPremConfig: OnPremConfig
        /// The name of the NFS server. This value is the IP address or Domain Name Service (DNS) name of the NFS server. An agent that is installed on-premises uses this hostname to mount the NFS server in a network.  If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information.  This name must either be DNS-compliant or must be an IP version 4 (IPv4) address.
        public let serverHostname: String
        /// The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination. The NFS path should be a path that's exported by the NFS server, or a subdirectory of that path. The path should be such that it can be mounted by other NFS clients in your network.  To see all the paths exported by your NFS server, run "showmount -e nfs-server-name" from an NFS client that has access to your server. You can specify any directory that appears in the results, and any subdirectory of that directory. Ensure that the NFS export is accessible without Kerberos authentication.  To transfer all the data in the folder you specified, DataSync needs to have permissions to read all the data. To ensure this, either configure the NFS export with no_root_squash, or ensure that the permissions for all of the files that you want DataSync allow read access for all users. Doing either enables the agent to read the files. For the agent to access directories, you must additionally enable all execute access. If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information. For information about NFS export configuration, see 18.7. The /etc/exports Configuration File in the Red Hat Enterprise Linux documentation.
        public let subdirectory: String
        /// The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.
        public let tags: [TagListEntry]?

        public init(mountOptions: NfsMountOptions? = nil, onPremConfig: OnPremConfig, serverHostname: String, subdirectory: String, tags: [TagListEntry]? = nil) {
            self.mountOptions = mountOptions
            self.onPremConfig = onPremConfig
            self.serverHostname = serverHostname
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.onPremConfig.validate(name: "\(name).onPremConfig")
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, max: 255)
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, pattern: "^(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9])$")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\p{Zs}]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case mountOptions = "MountOptions"
            case onPremConfig = "OnPremConfig"
            case serverHostname = "ServerHostname"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationNfsResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the source NFS file system location that is created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationObjectStorageRequest: AWSEncodableShape {
        /// Specifies the access key (for example, a user name) if credentials are required to authenticate with the object storage server.
        public let accessKey: String?
        /// Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can securely connect with your location.
        public let agentArns: [String]
        /// Specifies the name of the object storage bucket involved in the transfer.
        public let bucketName: String
        /// Specifies the secret key (for example, a password) if credentials are required to authenticate with the object storage server.
        public let secretKey: String?
        /// Specifies a certificate to authenticate with an object storage system that uses a private or self-signed certificate authority (CA). You must specify a Base64-encoded .pem file (for example, file:///home/user/.ssh/storage_sys_certificate.pem). The certificate can be up to 32768 bytes (before Base64 encoding). To use this parameter, configure ServerProtocol to HTTPS.
        public let serverCertificate: AWSBase64Data?
        /// Specifies the domain name or IP address of the object storage server. A DataSync agent uses this hostname to mount the object storage server in a network.
        public let serverHostname: String
        /// Specifies the port that your object storage server accepts inbound network traffic on (for example, port 443).
        public let serverPort: Int?
        /// Specifies the protocol that your object storage server uses to communicate.
        public let serverProtocol: ObjectStorageServerProtocol?
        /// Specifies the object prefix for your object storage server. If this is a source location, DataSync only copies objects with this prefix. If this is a destination location, DataSync writes all objects with this prefix.
        public let subdirectory: String?
        /// Specifies the key-value pair that represents a tag that you want to add to the resource. Tags can help you manage, filter, and search for your resources. We recommend creating a name tag for your location.
        public let tags: [TagListEntry]?

        public init(accessKey: String? = nil, agentArns: [String], bucketName: String, secretKey: String? = nil, serverCertificate: AWSBase64Data? = nil, serverHostname: String, serverPort: Int? = nil, serverProtocol: ObjectStorageServerProtocol? = nil, subdirectory: String? = nil, tags: [TagListEntry]? = nil) {
            self.accessKey = accessKey
            self.agentArns = agentArns
            self.bucketName = bucketName
            self.secretKey = secretKey
            self.serverCertificate = serverCertificate
            self.serverHostname = serverHostname
            self.serverPort = serverPort
            self.serverProtocol = serverProtocol
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.accessKey, name: "accessKey", parent: name, max: 200)
            try self.validate(self.accessKey, name: "accessKey", parent: name, min: 8)
            try self.validate(self.accessKey, name: "accessKey", parent: name, pattern: "^.+$")
            try self.agentArns.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
            try self.validate(self.bucketName, name: "bucketName", parent: name, max: 63)
            try self.validate(self.bucketName, name: "bucketName", parent: name, min: 3)
            try self.validate(self.bucketName, name: "bucketName", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$")
            try self.validate(self.secretKey, name: "secretKey", parent: name, max: 200)
            try self.validate(self.secretKey, name: "secretKey", parent: name, min: 8)
            try self.validate(self.secretKey, name: "secretKey", parent: name, pattern: "^.+$")
            try self.validate(self.serverCertificate, name: "serverCertificate", parent: name, max: 32768)
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, max: 255)
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, pattern: "^(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9])$")
            try self.validate(self.serverPort, name: "serverPort", parent: name, max: 65536)
            try self.validate(self.serverPort, name: "serverPort", parent: name, min: 1)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\p{Zs}]*$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case accessKey = "AccessKey"
            case agentArns = "AgentArns"
            case bucketName = "BucketName"
            case secretKey = "SecretKey"
            case serverCertificate = "ServerCertificate"
            case serverHostname = "ServerHostname"
            case serverPort = "ServerPort"
            case serverProtocol = "ServerProtocol"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationObjectStorageResponse: AWSDecodableShape {
        /// Specifies the ARN of the object storage system location that you create.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationS3Request: AWSEncodableShape {
        /// If you're using DataSync on an Amazon Web Services Outpost, specify the Amazon Resource Names (ARNs) of the DataSync agents deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web Services Outpost, see Deploy your DataSync agent on Outposts.
        public let agentArns: [String]?
        /// The ARN of the Amazon S3 bucket. If the bucket is on an Amazon Web Services Outpost, this must be an access point ARN.
        public let s3BucketArn: String
        public let s3Config: S3Config
        /// The Amazon S3 storage class that you want to store your files in when this location is used as a task destination. For buckets in Amazon Web Services Regions, the storage class defaults to Standard. For buckets on Outposts, the storage class defaults to Amazon Web Services S3 Outposts. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
        public let s3StorageClass: S3StorageClass?
        /// A subdirectory in the Amazon S3 bucket. This subdirectory in Amazon S3 is used to read data from the S3 source location or write data to the S3 destination.
        public let subdirectory: String?
        /// The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.
        public let tags: [TagListEntry]?

        public init(agentArns: [String]? = nil, s3BucketArn: String, s3Config: S3Config, s3StorageClass: S3StorageClass? = nil, subdirectory: String? = nil, tags: [TagListEntry]? = nil) {
            self.agentArns = agentArns
            self.s3BucketArn = s3BucketArn
            self.s3Config = s3Config
            self.s3StorageClass = s3StorageClass
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.agentArns?.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
            try self.validate(self.s3BucketArn, name: "s3BucketArn", parent: name, max: 156)
            try self.validate(self.s3BucketArn, name: "s3BucketArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):(s3|s3-outposts):[a-z\\-0-9]*:[0-9]*:.*$")
            try self.s3Config.validate(name: "\(name).s3Config")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\p{Zs}]*$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case s3BucketArn = "S3BucketArn"
            case s3Config = "S3Config"
            case s3StorageClass = "S3StorageClass"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationS3Response: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the source Amazon S3 bucket location that is created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationSmbRequest: AWSEncodableShape {
        /// The Amazon Resource Names (ARNs) of agents to use for a Simple Message Block (SMB) location.
        public let agentArns: [String]
        /// The name of the Windows domain that the SMB server belongs to.
        public let domain: String?
        /// The mount options used by DataSync to access the SMB server.
        public let mountOptions: SmbMountOptions?
        /// The password of the user who can mount the share, has the permissions to access files and folders in the SMB share.
        public let password: String
        /// The name of the SMB server. This value is the IP address or Domain Name Service (DNS) name of the SMB server. An agent that is installed on-premises uses this hostname to mount the SMB server in a network.  This name must either be DNS-compliant or must be an IP version 4 (IPv4) address.
        public let serverHostname: String
        /// The subdirectory in the SMB file system that is used to read data from the SMB source location or write data to the SMB destination. The SMB path should be a path that's exported by the SMB server, or a subdirectory of that path. The path should be such that it can be mounted by other SMB clients in your network.   Subdirectory must be specified with forward slashes. For example, /path/to/folder.  To transfer all the data in the folder you specified, DataSync needs to have permissions to mount the SMB share, as well as to access all the data in that share. To ensure this, either ensure that the user/password specified belongs to the user who can mount the share, and who has the appropriate permissions for all of the files and directories that you want DataSync to access, or use credentials of a member of the Backup Operators group to mount the share. Doing either enables the agent to access the data. For the agent to access directories, you must additionally enable all execute access.
        public let subdirectory: String
        /// The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.
        public let tags: [TagListEntry]?
        /// The user who can mount the share, has the permissions to access files and folders in the SMB share. For information about choosing a user name that ensures sufficient permissions to files, folders, and metadata, see the User setting for SMB locations.
        public let user: String

        public init(agentArns: [String], domain: String? = nil, mountOptions: SmbMountOptions? = nil, password: String, serverHostname: String, subdirectory: String, tags: [TagListEntry]? = nil, user: String) {
            self.agentArns = agentArns
            self.domain = domain
            self.mountOptions = mountOptions
            self.password = password
            self.serverHostname = serverHostname
            self.subdirectory = subdirectory
            self.tags = tags
            self.user = user
        }

        public func validate(name: String) throws {
            try self.agentArns.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, max: 253)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[A-Za-z0-9]((\\.|-+)?[A-Za-z0-9]){0,252}$")
            try self.validate(self.password, name: "password", parent: name, max: 104)
            try self.validate(self.password, name: "password", parent: name, pattern: "^.{0,104}$")
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, max: 255)
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, pattern: "^(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9])$")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.user, name: "user", parent: name, max: 104)
            try self.validate(self.user, name: "user", parent: name, pattern: "^[^\\x5B\\x5D\\\\/:;|=,+*?]{1,104}$")
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case domain = "Domain"
            case mountOptions = "MountOptions"
            case password = "Password"
            case serverHostname = "ServerHostname"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
            case user = "User"
        }
    }

    public struct CreateLocationSmbResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the source SMB file system location that is created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateTaskRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.
        public let cloudWatchLogGroupArn: String?
        /// The Amazon Resource Name (ARN) of an Amazon Web Services storage resource's location.
        public let destinationLocationArn: String
        /// Specifies a list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
        public let excludes: [FilterRule]?
        /// Specifies a list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
        public let includes: [FilterRule]?
        /// The name of a task. This value is a text reference that is used to identify the task in the console.
        public let name: String?
        /// Specifies the configuration options for a task. Some options include preserving file or object metadata and verifying data integrity. You can also override these options before starting an individual run of a task (also known as a task execution). For more information, see StartTaskExecution.
        public let options: Options?
        /// Specifies a schedule used to periodically transfer files from a source to a destination location. The schedule should be specified in UTC time. For more information, see Scheduling your task.
        public let schedule: TaskSchedule?
        /// The Amazon Resource Name (ARN) of the source location for the task.
        public let sourceLocationArn: String
        /// Specifies the tags that you want to apply to the Amazon Resource Name (ARN) representing the task.  Tags are key-value pairs that help you manage, filter, and search for your DataSync resources.
        public let tags: [TagListEntry]?

        public init(cloudWatchLogGroupArn: String? = nil, destinationLocationArn: String, excludes: [FilterRule]? = nil, includes: [FilterRule]? = nil, name: String? = nil, options: Options? = nil, schedule: TaskSchedule? = nil, sourceLocationArn: String, tags: [TagListEntry]? = nil) {
            self.cloudWatchLogGroupArn = cloudWatchLogGroupArn
            self.destinationLocationArn = destinationLocationArn
            self.excludes = excludes
            self.includes = includes
            self.name = name
            self.options = options
            self.schedule = schedule
            self.sourceLocationArn = sourceLocationArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.cloudWatchLogGroupArn, name: "cloudWatchLogGroupArn", parent: name, max: 562)
            try self.validate(self.cloudWatchLogGroupArn, name: "cloudWatchLogGroupArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):logs:[a-z\\-0-9]*:[0-9]{12}:log-group:([^:\\*]*)(:\\*)?$")
            try self.validate(self.destinationLocationArn, name: "destinationLocationArn", parent: name, max: 128)
            try self.validate(self.destinationLocationArn, name: "destinationLocationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
            try self.excludes?.forEach {
                try $0.validate(name: "\(name).excludes[]")
            }
            try self.validate(self.excludes, name: "excludes", parent: name, max: 1)
            try self.includes?.forEach {
                try $0.validate(name: "\(name).includes[]")
            }
            try self.validate(self.includes, name: "includes", parent: name, max: 1)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:@/-]+$")
            try self.options?.validate(name: "\(name).options")
            try self.schedule?.validate(name: "\(name).schedule")
            try self.validate(self.sourceLocationArn, name: "sourceLocationArn", parent: name, max: 128)
            try self.validate(self.sourceLocationArn, name: "sourceLocationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogGroupArn = "CloudWatchLogGroupArn"
            case destinationLocationArn = "DestinationLocationArn"
            case excludes = "Excludes"
            case includes = "Includes"
            case name = "Name"
            case options = "Options"
            case schedule = "Schedule"
            case sourceLocationArn = "SourceLocationArn"
            case tags = "Tags"
        }
    }

    public struct CreateTaskResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the task.
        public let taskArn: String?

        public init(taskArn: String? = nil) {
            self.taskArn = taskArn
        }

        private enum CodingKeys: String, CodingKey {
            case taskArn = "TaskArn"
        }
    }

    public struct DeleteAgentRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the agent to delete. Use the ListAgents operation to return a list of agents for your account and Amazon Web Services Region.
        public let agentArn: String

        public init(agentArn: String) {
            self.agentArn = agentArn
        }

        public func validate(name: String) throws {
            try self.validate(self.agentArn, name: "agentArn", parent: name, max: 128)
            try self.validate(self.agentArn, name: "agentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
        }
    }

    public struct DeleteAgentResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteLocationRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the location to delete.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DeleteLocationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteTaskRequest: AWSEncodableShape {
        /// Specifies the Amazon Resource Name (ARN) of the task that you want to delete.
        public let taskArn: String

        public init(taskArn: String) {
            self.taskArn = taskArn
        }

        public func validate(name: String) throws {
            try self.validate(self.taskArn, name: "taskArn", parent: name, max: 128)
            try self.validate(self.taskArn, name: "taskArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case taskArn = "TaskArn"
        }
    }

    public struct DeleteTaskResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeAgentRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the agent to describe.
        public let agentArn: String

        public init(agentArn: String) {
            self.agentArn = agentArn
        }

        public func validate(name: String) throws {
            try self.validate(self.agentArn, name: "agentArn", parent: name, max: 128)
            try self.validate(self.agentArn, name: "agentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
        }
    }

    public struct DescribeAgentResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the agent.
        public let agentArn: String?
        /// The time that the agent was activated (that is, created in your account).
        public let creationTime: Date?
        /// The type of endpoint that your agent is connected to. If the endpoint is a VPC endpoint, the agent is not accessible over the public internet.
        public let endpointType: EndpointType?
        /// The time that the agent last connected to DataSync.
        public let lastConnectionTime: Date?
        /// The name of the agent.
        public let name: String?
        /// The subnet and the security group that DataSync used to access a VPC endpoint.
        public let privateLinkConfig: PrivateLinkConfig?
        /// The status of the agent. If the status is ONLINE, then the agent is configured properly and is available to use. The Running status is the normal running status for an agent. If the status is OFFLINE, the agent's VM is turned off or the agent is in an unhealthy state. When the issue that caused the unhealthy state is resolved, the agent returns to ONLINE status.
        public let status: AgentStatus?

        public init(agentArn: String? = nil, creationTime: Date? = nil, endpointType: EndpointType? = nil, lastConnectionTime: Date? = nil, name: String? = nil, privateLinkConfig: PrivateLinkConfig? = nil, status: AgentStatus? = nil) {
            self.agentArn = agentArn
            self.creationTime = creationTime
            self.endpointType = endpointType
            self.lastConnectionTime = lastConnectionTime
            self.name = name
            self.privateLinkConfig = privateLinkConfig
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
            case creationTime = "CreationTime"
            case endpointType = "EndpointType"
            case lastConnectionTime = "LastConnectionTime"
            case name = "Name"
            case privateLinkConfig = "PrivateLinkConfig"
            case status = "Status"
        }
    }

    public struct DescribeLocationEfsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon EFS file system location that you want information about.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationEfsResponse: AWSDecodableShape {
        /// The ARN of the access point that DataSync uses to access the Amazon EFS file system.
        public let accessPointArn: String?
        /// The time that the location was created.
        public let creationTime: Date?
        public let ec2Config: Ec2Config?
        /// The Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
        public let fileSystemAccessRoleArn: String?
        /// Describes whether DataSync uses Transport Layer Security (TLS) encryption when copying data to or from the Amazon EFS file system.
        public let inTransitEncryption: EfsInTransitEncryption?
        /// The ARN of the Amazon EFS file system location.
        public let locationArn: String?
        /// The URL of the Amazon EFS file system location.
        public let locationUri: String?

        public init(accessPointArn: String? = nil, creationTime: Date? = nil, ec2Config: Ec2Config? = nil, fileSystemAccessRoleArn: String? = nil, inTransitEncryption: EfsInTransitEncryption? = nil, locationArn: String? = nil, locationUri: String? = nil) {
            self.accessPointArn = accessPointArn
            self.creationTime = creationTime
            self.ec2Config = ec2Config
            self.fileSystemAccessRoleArn = fileSystemAccessRoleArn
            self.inTransitEncryption = inTransitEncryption
            self.locationArn = locationArn
            self.locationUri = locationUri
        }

        private enum CodingKeys: String, CodingKey {
            case accessPointArn = "AccessPointArn"
            case creationTime = "CreationTime"
            case ec2Config = "Ec2Config"
            case fileSystemAccessRoleArn = "FileSystemAccessRoleArn"
            case inTransitEncryption = "InTransitEncryption"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
        }
    }

    public struct DescribeLocationFsxLustreRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the FSx for Lustre location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationFsxLustreResponse: AWSDecodableShape {
        /// The time that the FSx for Lustre location was created.
        public let creationTime: Date?
        /// The Amazon Resource Name (ARN) of the FSx for Lustre location that was described.
        public let locationArn: String?
        /// The URI of the FSx for Lustre location that was described.
        public let locationUri: String?
        /// The Amazon Resource Names (ARNs) of the security groups that are configured for the FSx for Lustre file system.
        public let securityGroupArns: [String]?

        public init(creationTime: Date? = nil, locationArn: String? = nil, locationUri: String? = nil, securityGroupArns: [String]? = nil) {
            self.creationTime = creationTime
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.securityGroupArns = securityGroupArns
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case securityGroupArns = "SecurityGroupArns"
        }
    }

    public struct DescribeLocationFsxOntapRequest: AWSEncodableShape {
        /// Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP file system location that you want information about.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationFsxOntapResponse: AWSDecodableShape {
        /// The time that the location was created.
        public let creationTime: Date?
        /// The ARN of the FSx for ONTAP file system.
        public let fsxFilesystemArn: String?
        /// The ARN of the FSx for ONTAP file system location.
        public let locationArn: String?
        /// The uniform resource identifier (URI) of the FSx for ONTAP file system location.
        public let locationUri: String?
        public let `protocol`: FsxProtocol?
        /// The security groups that DataSync uses to access your FSx for ONTAP file system.
        public let securityGroupArns: [String]?
        /// The ARN of the storage virtual machine (SVM) on your FSx for ONTAP file system where you're copying data to or from.
        public let storageVirtualMachineArn: String?

        public init(creationTime: Date? = nil, fsxFilesystemArn: String? = nil, locationArn: String? = nil, locationUri: String? = nil, protocol: FsxProtocol? = nil, securityGroupArns: [String]? = nil, storageVirtualMachineArn: String? = nil) {
            self.creationTime = creationTime
            self.fsxFilesystemArn = fsxFilesystemArn
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.`protocol` = `protocol`
            self.securityGroupArns = securityGroupArns
            self.storageVirtualMachineArn = storageVirtualMachineArn
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case fsxFilesystemArn = "FsxFilesystemArn"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case `protocol` = "Protocol"
            case securityGroupArns = "SecurityGroupArns"
            case storageVirtualMachineArn = "StorageVirtualMachineArn"
        }
    }

    public struct DescribeLocationFsxOpenZfsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the FSx for OpenZFS location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationFsxOpenZfsResponse: AWSDecodableShape {
        /// The time that the FSx for OpenZFS location was created.
        public let creationTime: Date?
        /// The ARN of the FSx for OpenZFS location that was described.
        public let locationArn: String?
        /// The uniform resource identifier (URI) of the FSx for OpenZFS location that was described. Example: fsxz://us-west-2.fs-1234567890abcdef02/fsx/folderA/folder
        public let locationUri: String?
        /// The type of protocol that DataSync uses to access your file system.
        public let `protocol`: FsxProtocol?
        /// The ARNs of the security groups that are configured for the FSx for OpenZFS file system.
        public let securityGroupArns: [String]?

        public init(creationTime: Date? = nil, locationArn: String? = nil, locationUri: String? = nil, protocol: FsxProtocol? = nil, securityGroupArns: [String]? = nil) {
            self.creationTime = creationTime
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.`protocol` = `protocol`
            self.securityGroupArns = securityGroupArns
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case `protocol` = "Protocol"
            case securityGroupArns = "SecurityGroupArns"
        }
    }

    public struct DescribeLocationFsxWindowsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the FSx for Windows File Server location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationFsxWindowsResponse: AWSDecodableShape {
        /// The time that the FSx for Windows File Server location was created.
        public let creationTime: Date?
        /// The name of the Windows domain that the FSx for Windows File Server belongs to.
        public let domain: String?
        /// The Amazon Resource Name (ARN) of the FSx for Windows File Server location that was described.
        public let locationArn: String?
        /// The URL of the FSx for Windows File Server location that was described.
        public let locationUri: String?
        /// The Amazon Resource Names (ARNs) of the security groups that are configured for the FSx for Windows File Server file system.
        public let securityGroupArns: [String]?
        /// The user who has the permissions to access files and folders in the FSx for Windows File Server file system.
        public let user: String?

        public init(creationTime: Date? = nil, domain: String? = nil, locationArn: String? = nil, locationUri: String? = nil, securityGroupArns: [String]? = nil, user: String? = nil) {
            self.creationTime = creationTime
            self.domain = domain
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.securityGroupArns = securityGroupArns
            self.user = user
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case domain = "Domain"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case securityGroupArns = "SecurityGroupArns"
            case user = "User"
        }
    }

    public struct DescribeLocationHdfsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the HDFS cluster location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationHdfsResponse: AWSDecodableShape {
        /// The ARNs of the agents that are used to connect to the HDFS cluster.
        public let agentArns: [String]?
        /// The type of authentication used to determine the identity of the user.
        public let authenticationType: HdfsAuthenticationType?
        /// The size of the data blocks to write into the HDFS cluster.
        public let blockSize: Int?
        /// The time that the HDFS location was created.
        public let creationTime: Date?
        /// The Kerberos principal with access to the files and folders on the HDFS cluster. This parameter is used if the AuthenticationType is defined as KERBEROS.
        public let kerberosPrincipal: String?
        ///  The URI of the HDFS cluster's Key Management Server (KMS).
        public let kmsKeyProviderUri: String?
        /// The ARN of the HDFS cluster location.
        public let locationArn: String?
        /// The URI of the HDFS cluster location.
        public let locationUri: String?
        /// The NameNode that manage the HDFS namespace.
        public let nameNodes: [HdfsNameNode]?
        /// The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) cluster.
        public let qopConfiguration: QopConfiguration?
        /// The number of DataNodes to replicate the data to when writing to the HDFS cluster.
        public let replicationFactor: Int?
        /// The user name used to identify the client on the host operating system. This parameter is used if the AuthenticationType is defined as SIMPLE.
        public let simpleUser: String?

        public init(agentArns: [String]? = nil, authenticationType: HdfsAuthenticationType? = nil, blockSize: Int? = nil, creationTime: Date? = nil, kerberosPrincipal: String? = nil, kmsKeyProviderUri: String? = nil, locationArn: String? = nil, locationUri: String? = nil, nameNodes: [HdfsNameNode]? = nil, qopConfiguration: QopConfiguration? = nil, replicationFactor: Int? = nil, simpleUser: String? = nil) {
            self.agentArns = agentArns
            self.authenticationType = authenticationType
            self.blockSize = blockSize
            self.creationTime = creationTime
            self.kerberosPrincipal = kerberosPrincipal
            self.kmsKeyProviderUri = kmsKeyProviderUri
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.nameNodes = nameNodes
            self.qopConfiguration = qopConfiguration
            self.replicationFactor = replicationFactor
            self.simpleUser = simpleUser
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case authenticationType = "AuthenticationType"
            case blockSize = "BlockSize"
            case creationTime = "CreationTime"
            case kerberosPrincipal = "KerberosPrincipal"
            case kmsKeyProviderUri = "KmsKeyProviderUri"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case nameNodes = "NameNodes"
            case qopConfiguration = "QopConfiguration"
            case replicationFactor = "ReplicationFactor"
            case simpleUser = "SimpleUser"
        }
    }

    public struct DescribeLocationNfsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the NFS location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationNfsResponse: AWSDecodableShape {
        /// The time that the NFS location was created.
        public let creationTime: Date?
        /// The Amazon Resource Name (ARN) of the NFS location that was described.
        public let locationArn: String?
        /// The URL of the source NFS location that was described.
        public let locationUri: String?
        /// The NFS mount options that DataSync used to mount your NFS share.
        public let mountOptions: NfsMountOptions?
        public let onPremConfig: OnPremConfig?

        public init(creationTime: Date? = nil, locationArn: String? = nil, locationUri: String? = nil, mountOptions: NfsMountOptions? = nil, onPremConfig: OnPremConfig? = nil) {
            self.creationTime = creationTime
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.mountOptions = mountOptions
            self.onPremConfig = onPremConfig
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case mountOptions = "MountOptions"
            case onPremConfig = "OnPremConfig"
        }
    }

    public struct DescribeLocationObjectStorageRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the object storage system location that you want information about.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationObjectStorageResponse: AWSDecodableShape {
        /// The access key (for example, a user name) required to authenticate with the object storage system.
        public let accessKey: String?
        /// The ARNs of the DataSync agents that can securely connect with your location.
        public let agentArns: [String]?
        /// The time that the location was created.
        public let creationTime: Date?
        /// The ARN of the object storage system location.
        public let locationArn: String?
        /// The URL of the object storage system location.
        public let locationUri: String?
        /// The self-signed certificate that DataSync uses to securely authenticate with your object storage system.
        public let serverCertificate: AWSBase64Data?
        /// The port that your object storage server accepts inbound network traffic on (for example, port 443).
        public let serverPort: Int?
        /// The protocol that your object storage system uses to communicate.
        public let serverProtocol: ObjectStorageServerProtocol?

        public init(accessKey: String? = nil, agentArns: [String]? = nil, creationTime: Date? = nil, locationArn: String? = nil, locationUri: String? = nil, serverCertificate: AWSBase64Data? = nil, serverPort: Int? = nil, serverProtocol: ObjectStorageServerProtocol? = nil) {
            self.accessKey = accessKey
            self.agentArns = agentArns
            self.creationTime = creationTime
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.serverCertificate = serverCertificate
            self.serverPort = serverPort
            self.serverProtocol = serverProtocol
        }

        private enum CodingKeys: String, CodingKey {
            case accessKey = "AccessKey"
            case agentArns = "AgentArns"
            case creationTime = "CreationTime"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case serverCertificate = "ServerCertificate"
            case serverPort = "ServerPort"
            case serverProtocol = "ServerProtocol"
        }
    }

    public struct DescribeLocationS3Request: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationS3Response: AWSDecodableShape {
        /// If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2 agents deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web Services Outpost, see Deploy your DataSync agent on Outposts.
        public let agentArns: [String]?
        /// The time that the Amazon S3 bucket location was created.
        public let creationTime: Date?
        /// The Amazon Resource Name (ARN) of the Amazon S3 bucket or access point.
        public let locationArn: String?
        /// The URL of the Amazon S3 location that was described.
        public let locationUri: String?
        public let s3Config: S3Config?
        /// The Amazon S3 storage class that you chose to store your files in when this location is used as a task destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have behaviors that can affect your S3 storage cost. For detailed information, see Considerations when  working with S3 storage classes in DataSync.
        public let s3StorageClass: S3StorageClass?

        public init(agentArns: [String]? = nil, creationTime: Date? = nil, locationArn: String? = nil, locationUri: String? = nil, s3Config: S3Config? = nil, s3StorageClass: S3StorageClass? = nil) {
            self.agentArns = agentArns
            self.creationTime = creationTime
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.s3Config = s3Config
            self.s3StorageClass = s3StorageClass
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case creationTime = "CreationTime"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case s3Config = "S3Config"
            case s3StorageClass = "S3StorageClass"
        }
    }

    public struct DescribeLocationSmbRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the SMB location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationSmbResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the source SMB file system location that is created.
        public let agentArns: [String]?
        /// The time that the SMB location was created.
        public let creationTime: Date?
        /// The name of the Windows domain that the SMB server belongs to.
        public let domain: String?
        /// The Amazon Resource Name (ARN) of the SMB location that was described.
        public let locationArn: String?
        /// The URL of the source SMB location that was described.
        public let locationUri: String?
        /// The mount options that are available for DataSync to use to access an SMB location.
        public let mountOptions: SmbMountOptions?
        /// The user who can mount the share, has the permissions to access files and folders in the SMB share.
        public let user: String?

        public init(agentArns: [String]? = nil, creationTime: Date? = nil, domain: String? = nil, locationArn: String? = nil, locationUri: String? = nil, mountOptions: SmbMountOptions? = nil, user: String? = nil) {
            self.agentArns = agentArns
            self.creationTime = creationTime
            self.domain = domain
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.mountOptions = mountOptions
            self.user = user
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case creationTime = "CreationTime"
            case domain = "Domain"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case mountOptions = "MountOptions"
            case user = "User"
        }
    }

    public struct DescribeTaskExecutionRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the task that is being executed.
        public let taskExecutionArn: String

        public init(taskExecutionArn: String) {
            self.taskExecutionArn = taskExecutionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, max: 128)
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}/execution/exec-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct DescribeTaskExecutionResponse: AWSDecodableShape {
        /// The physical number of bytes transferred over the network after compression was applied. In most cases, this number is less than BytesTransferred unless the data isn't compressible.
        public let bytesCompressed: Int64?
        /// The total number of bytes that are involved in the transfer. For the number of bytes sent over the network, see BytesCompressed.
        public let bytesTransferred: Int64?
        /// The number of logical bytes written to the destination Amazon Web Services storage resource.
        public let bytesWritten: Int64?
        /// The estimated physical number of bytes that is to be transferred over the network.
        public let estimatedBytesToTransfer: Int64?
        /// The expected number of files that is to be transferred over the network. This value is calculated during the PREPARING phase before the TRANSFERRING phase of the task execution. This value is the expected number of files to be transferred. It's calculated based on comparing the content of the source and destination locations and finding the delta that needs to be transferred.
        public let estimatedFilesToTransfer: Int64?
        /// A list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
        public let excludes: [FilterRule]?
        /// The actual number of files that was transferred over the network. This value is calculated and updated on an ongoing basis during the TRANSFERRING phase of the task execution. It's updated periodically when each file is read from the source and sent over the network.  If failures occur during a transfer, this value can be less than EstimatedFilesToTransfer. In some cases, this value can also be greater than EstimatedFilesToTransfer. This element is implementation-specific for some location types, so don't use it as an indicator for a correct file number or to monitor your task execution.
        public let filesTransferred: Int64?
        /// A list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
        public let includes: [FilterRule]?
        public let options: Options?
        /// The result of the task execution.
        public let result: TaskExecutionResultDetail?
        /// The time that the task execution was started.
        public let startTime: Date?
        /// The status of the task execution.  For detailed information about task execution statuses, see Understanding Task Statuses in the DataSync User Guide.
        public let status: TaskExecutionStatus?
        /// The Amazon Resource Name (ARN) of the task execution that was described. TaskExecutionArn is hierarchical and includes TaskArn for the task that was executed.  For example, a TaskExecution value with the ARN arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b executed the task with the ARN arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2.
        public let taskExecutionArn: String?

        public init(bytesCompressed: Int64? = nil, bytesTransferred: Int64? = nil, bytesWritten: Int64? = nil, estimatedBytesToTransfer: Int64? = nil, estimatedFilesToTransfer: Int64? = nil, excludes: [FilterRule]? = nil, filesTransferred: Int64? = nil, includes: [FilterRule]? = nil, options: Options? = nil, result: TaskExecutionResultDetail? = nil, startTime: Date? = nil, status: TaskExecutionStatus? = nil, taskExecutionArn: String? = nil) {
            self.bytesCompressed = bytesCompressed
            self.bytesTransferred = bytesTransferred
            self.bytesWritten = bytesWritten
            self.estimatedBytesToTransfer = estimatedBytesToTransfer
            self.estimatedFilesToTransfer = estimatedFilesToTransfer
            self.excludes = excludes
            self.filesTransferred = filesTransferred
            self.includes = includes
            self.options = options
            self.result = result
            self.startTime = startTime
            self.status = status
            self.taskExecutionArn = taskExecutionArn
        }

        private enum CodingKeys: String, CodingKey {
            case bytesCompressed = "BytesCompressed"
            case bytesTransferred = "BytesTransferred"
            case bytesWritten = "BytesWritten"
            case estimatedBytesToTransfer = "EstimatedBytesToTransfer"
            case estimatedFilesToTransfer = "EstimatedFilesToTransfer"
            case excludes = "Excludes"
            case filesTransferred = "FilesTransferred"
            case includes = "Includes"
            case options = "Options"
            case result = "Result"
            case startTime = "StartTime"
            case status = "Status"
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct DescribeTaskRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the task to describe.
        public let taskArn: String

        public init(taskArn: String) {
            self.taskArn = taskArn
        }

        public func validate(name: String) throws {
            try self.validate(self.taskArn, name: "taskArn", parent: name, max: 128)
            try self.validate(self.taskArn, name: "taskArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case taskArn = "TaskArn"
        }
    }

    public struct DescribeTaskResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that was used to monitor and log events in the task. For more information on these groups, see Working with Log Groups and Log Streams in the Amazon CloudWatch User Guide.
        public let cloudWatchLogGroupArn: String?
        /// The time that the task was created.
        public let creationTime: Date?
        /// The Amazon Resource Name (ARN) of the task execution that is transferring files.
        public let currentTaskExecutionArn: String?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services storage resource's location.
        public let destinationLocationArn: String?
        /// The Amazon Resource Names (ARNs) of the network interfaces created for your destination location. For more information, see Network interface requirements.
        public let destinationNetworkInterfaceArns: [String]?
        /// Errors that DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.
        public let errorCode: String?
        /// Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues.
        public let errorDetail: String?
        /// A list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
        public let excludes: [FilterRule]?
        /// A list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
        public let includes: [FilterRule]?
        /// The name of the task that was described.
        public let name: String?
        /// The configuration options that control the behavior of the StartTaskExecution operation. Some options include preserving file or object metadata and verifying data integrity. You can override these options for each task execution. For more information, see StartTaskExecution.
        public let options: Options?
        /// The schedule used to periodically transfer files from a source to a destination location.
        public let schedule: TaskSchedule?
        /// The Amazon Resource Name (ARN) of the source file system's location.
        public let sourceLocationArn: String?
        /// The Amazon Resource Names (ARNs) of the network interfaces created for your source location. For more information, see Network interface requirements.
        public let sourceNetworkInterfaceArns: [String]?
        /// The status of the task that was described. For detailed information about task execution statuses, see Understanding Task Statuses in the DataSync User Guide.
        public let status: TaskStatus?
        /// The Amazon Resource Name (ARN) of the task that was described.
        public let taskArn: String?

        public init(cloudWatchLogGroupArn: String? = nil, creationTime: Date? = nil, currentTaskExecutionArn: String? = nil, destinationLocationArn: String? = nil, destinationNetworkInterfaceArns: [String]? = nil, errorCode: String? = nil, errorDetail: String? = nil, excludes: [FilterRule]? = nil, includes: [FilterRule]? = nil, name: String? = nil, options: Options? = nil, schedule: TaskSchedule? = nil, sourceLocationArn: String? = nil, sourceNetworkInterfaceArns: [String]? = nil, status: TaskStatus? = nil, taskArn: String? = nil) {
            self.cloudWatchLogGroupArn = cloudWatchLogGroupArn
            self.creationTime = creationTime
            self.currentTaskExecutionArn = currentTaskExecutionArn
            self.destinationLocationArn = destinationLocationArn
            self.destinationNetworkInterfaceArns = destinationNetworkInterfaceArns
            self.errorCode = errorCode
            self.errorDetail = errorDetail
            self.excludes = excludes
            self.includes = includes
            self.name = name
            self.options = options
            self.schedule = schedule
            self.sourceLocationArn = sourceLocationArn
            self.sourceNetworkInterfaceArns = sourceNetworkInterfaceArns
            self.status = status
            self.taskArn = taskArn
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogGroupArn = "CloudWatchLogGroupArn"
            case creationTime = "CreationTime"
            case currentTaskExecutionArn = "CurrentTaskExecutionArn"
            case destinationLocationArn = "DestinationLocationArn"
            case destinationNetworkInterfaceArns = "DestinationNetworkInterfaceArns"
            case errorCode = "ErrorCode"
            case errorDetail = "ErrorDetail"
            case excludes = "Excludes"
            case includes = "Includes"
            case name = "Name"
            case options = "Options"
            case schedule = "Schedule"
            case sourceLocationArn = "SourceLocationArn"
            case sourceNetworkInterfaceArns = "SourceNetworkInterfaceArns"
            case status = "Status"
            case taskArn = "TaskArn"
        }
    }

    public struct Ec2Config: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the Amazon Resource Names (ARNs) of the security groups associated with an Amazon EFS file system's mount target.
        public let securityGroupArns: [String]
        /// Specifies the ARN of a subnet where DataSync creates the network interfaces for managing traffic during your transfer. The subnet must be located:   In the same virtual private cloud (VPC) as the Amazon EFS file system.   In the same Availability Zone as at least one mount target for the Amazon EFS file system.    You don't need to specify a subnet that includes a file system mount target.
        public let subnetArn: String

        public init(securityGroupArns: [String], subnetArn: String) {
            self.securityGroupArns = securityGroupArns
            self.subnetArn = subnetArn
        }

        public func validate(name: String) throws {
            try self.securityGroupArns.forEach {
                try validate($0, name: "securityGroupArns[]", parent: name, max: 128)
                try validate($0, name: "securityGroupArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:security-group/.*$")
            }
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, max: 5)
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, min: 1)
            try self.validate(self.subnetArn, name: "subnetArn", parent: name, max: 128)
            try self.validate(self.subnetArn, name: "subnetArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:subnet/.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case securityGroupArns = "SecurityGroupArns"
            case subnetArn = "SubnetArn"
        }
    }

    public struct FilterRule: AWSEncodableShape & AWSDecodableShape {
        /// The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
        public let filterType: FilterType?
        /// A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
        public let value: String?

        public init(filterType: FilterType? = nil, value: String? = nil) {
            self.filterType = filterType
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.value, name: "value", parent: name, max: 102_400)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[^\\x00]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case filterType = "FilterType"
            case value = "Value"
        }
    }

    public struct FsxProtocol: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).
        public let nfs: FsxProtocolNfs?
        /// Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's SVM.
        public let smb: FsxProtocolSmb?

        public init(nfs: FsxProtocolNfs? = nil, smb: FsxProtocolSmb? = nil) {
            self.nfs = nfs
            self.smb = smb
        }

        public func validate(name: String) throws {
            try self.smb?.validate(name: "\(name).smb")
        }

        private enum CodingKeys: String, CodingKey {
            case nfs = "NFS"
            case smb = "SMB"
        }
    }

    public struct FsxProtocolNfs: AWSEncodableShape & AWSDecodableShape {
        public let mountOptions: NfsMountOptions?

        public init(mountOptions: NfsMountOptions? = nil) {
            self.mountOptions = mountOptions
        }

        private enum CodingKeys: String, CodingKey {
            case mountOptions = "MountOptions"
        }
    }

    public struct FsxProtocolSmb: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.
        public let domain: String?
        public let mountOptions: SmbMountOptions?
        /// Specifies the password of a user who has permission to access your SVM.
        public let password: String
        /// Specifies a user name that can mount the location and access the files, folders, and metadata that you need in the SVM. If you provide a user in your Active Directory, note the following:   If you're using Directory Service for Microsoft Active Directory, the user must be a member of the Amazon Web Services Delegated FSx Administrators group.   If you're using a self-managed Active Directory, the user must be a member of either the Domain Admins group or a custom group that you specified for file system administration when you created your file system.   Make sure that the user has the permissions it needs to copy the data you want:    SE_TCB_NAME: Required to set object ownership and file metadata. With this privilege, you also can copy NTFS discretionary access lists (DACLs).    SE_SECURITY_NAME: May be needed to copy NTFS system access control lists (SACLs). This operation specifically requires the Windows privilege, which is granted to members of the Domain Admins group. If you configure your task to copy SACLs, make sure that the user has the required privileges. For information about copying SACLs, see Ownership and permissions-related options.
        public let user: String

        public init(domain: String? = nil, mountOptions: SmbMountOptions? = nil, password: String, user: String) {
            self.domain = domain
            self.mountOptions = mountOptions
            self.password = password
            self.user = user
        }

        public func validate(name: String) throws {
            try self.validate(self.domain, name: "domain", parent: name, max: 253)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[A-Za-z0-9]((\\.|-+)?[A-Za-z0-9]){0,252}$")
            try self.validate(self.password, name: "password", parent: name, max: 104)
            try self.validate(self.password, name: "password", parent: name, pattern: "^.{0,104}$")
            try self.validate(self.user, name: "user", parent: name, max: 104)
            try self.validate(self.user, name: "user", parent: name, pattern: "^[^\\x5B\\x5D\\\\/:;|=,+*?]{1,104}$")
        }

        private enum CodingKeys: String, CodingKey {
            case domain = "Domain"
            case mountOptions = "MountOptions"
            case password = "Password"
            case user = "User"
        }
    }

    public struct HdfsNameNode: AWSEncodableShape & AWSDecodableShape {
        /// The hostname of the NameNode in the HDFS cluster. This value is the IP address or Domain Name Service (DNS) name of the NameNode. An agent that's installed on-premises uses this hostname to communicate with the NameNode in the network.
        public let hostname: String
        /// The port that the NameNode uses to listen to client requests.
        public let port: Int

        public init(hostname: String, port: Int) {
            self.hostname = hostname
            self.port = port
        }

        public func validate(name: String) throws {
            try self.validate(self.hostname, name: "hostname", parent: name, max: 255)
            try self.validate(self.hostname, name: "hostname", parent: name, min: 1)
            try self.validate(self.hostname, name: "hostname", parent: name, pattern: "^(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9])$")
            try self.validate(self.port, name: "port", parent: name, max: 65536)
            try self.validate(self.port, name: "port", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case hostname = "Hostname"
            case port = "Port"
        }
    }

    public struct ListAgentsRequest: AWSEncodableShape {
        /// The maximum number of agents to list.
        public let maxResults: Int?
        /// An opaque string that indicates the position at which to begin the next list of agents.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListAgentsResponse: AWSDecodableShape {
        /// A list of agents in your account.
        public let agents: [AgentListEntry]?
        /// An opaque string that indicates the position at which to begin returning the next list of agents.
        public let nextToken: String?

        public init(agents: [AgentListEntry]? = nil, nextToken: String? = nil) {
            self.agents = agents
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case agents = "Agents"
            case nextToken = "NextToken"
        }
    }

    public struct ListLocationsRequest: AWSEncodableShape {
        /// You can use API filters to narrow down the list of resources returned by ListLocations.  For example, to retrieve all tasks on a specific source location, you can use ListLocations  with filter name LocationType S3 and Operator Equals.
        public let filters: [LocationFilter]?
        /// The maximum number of locations to return.
        public let maxResults: Int?
        /// An opaque string that indicates the position at which to begin the next list of locations.
        public let nextToken: String?

        public init(filters: [LocationFilter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListLocationsResponse: AWSDecodableShape {
        /// An array that contains a list of locations.
        public let locations: [LocationListEntry]?
        /// An opaque string that indicates the position at which to begin returning the next list of locations.
        public let nextToken: String?

        public init(locations: [LocationListEntry]? = nil, nextToken: String? = nil) {
            self.locations = locations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case locations = "Locations"
            case nextToken = "NextToken"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// Specifies how many results that you want in the response.
        public let maxResults: Int?
        /// Specifies an opaque string that indicates the position to begin the next list of results in the response.
        public let nextToken: String?
        /// Specifies the Amazon Resource Name (ARN) of the resource that you want tag information on.
        public let resourceArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=_-]+$")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 128)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:(agent|task|location)/(agent|task|loc)-[a-f0-9]{17}(/execution/exec-[a-f0-9]{17})?$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The opaque string that indicates the position to begin the next list of results in the response.
        public let nextToken: String?
        /// An array of tags applied to the specified resource.
        public let tags: [TagListEntry]?

        public init(nextToken: String? = nil, tags: [TagListEntry]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tags = "Tags"
        }
    }

    public struct ListTaskExecutionsRequest: AWSEncodableShape {
        /// The maximum number of executed tasks to list.
        public let maxResults: Int?
        /// An opaque string that indicates the position at which to begin the next list of the executed tasks.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) of the task whose tasks you want to list.
        public let taskArn: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, taskArn: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.taskArn = taskArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=_-]+$")
            try self.validate(self.taskArn, name: "taskArn", parent: name, max: 128)
            try self.validate(self.taskArn, name: "taskArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case taskArn = "TaskArn"
        }
    }

    public struct ListTaskExecutionsResponse: AWSDecodableShape {
        /// An opaque string that indicates the position at which to begin returning the next list of executed tasks.
        public let nextToken: String?
        /// A list of executed tasks.
        public let taskExecutions: [TaskExecutionListEntry]?

        public init(nextToken: String? = nil, taskExecutions: [TaskExecutionListEntry]? = nil) {
            self.nextToken = nextToken
            self.taskExecutions = taskExecutions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case taskExecutions = "TaskExecutions"
        }
    }

    public struct ListTasksRequest: AWSEncodableShape {
        /// You can use API filters to narrow down the list of resources returned by ListTasks.  For example, to retrieve all tasks on a specific source location, you can use ListTasks with filter name LocationId and Operator Equals with the ARN for the  location.
        public let filters: [TaskFilter]?
        /// The maximum number of tasks to return.
        public let maxResults: Int?
        /// An opaque string that indicates the position at which to begin the next list of tasks.
        public let nextToken: String?

        public init(filters: [TaskFilter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListTasksResponse: AWSDecodableShape {
        /// An opaque string that indicates the position at which to begin returning the next list of tasks.
        public let nextToken: String?
        /// A list of all the tasks that are returned.
        public let tasks: [TaskListEntry]?

        public init(nextToken: String? = nil, tasks: [TaskListEntry]? = nil) {
            self.nextToken = nextToken
            self.tasks = tasks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tasks = "Tasks"
        }
    }

    public struct LocationFilter: AWSEncodableShape {
        /// The name of the filter being used. Each API call supports a list of filters that are available  for it (for example, LocationType for ListLocations).
        public let name: LocationFilterName
        /// The operator that is used to compare filter values (for example, Equals or  Contains).
        public let `operator`: Operator
        /// The values that you want to filter for. For example, you might want to display only Amazon S3  locations.
        public let values: [String]

        public init(name: LocationFilterName, operator: Operator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 255)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_\\ \\-\\:\\*\\.\\\\/\\?-]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case `operator` = "Operator"
            case values = "Values"
        }
    }

    public struct LocationListEntry: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the location. For Network File System (NFS) or Amazon EFS, the location is the export path. For Amazon S3, the location is the prefix path that you want to mount and use as the root of the location.
        public let locationArn: String?
        /// Represents a list of URIs of a location. LocationUri returns an array that contains a list of locations when the ListLocations operation is called. Format: TYPE://GLOBAL_ID/SUBDIR. TYPE designates the type of location (for example, nfs or s3). GLOBAL_ID is the globally unique identifier of the resource that backs the location. An example for EFS is us-east-2.fs-abcd1234. An example for Amazon S3 is the bucket name, such as myBucket. An example for NFS is a valid IPv4 address or a hostname that is compliant with Domain Name Service (DNS). SUBDIR is a valid file system path, delimited by forward slashes as is the *nix convention. For NFS and Amazon EFS, it's the export path to mount the location. For Amazon S3, it's the prefix path that you mount to and treat as the root of the location.
        public let locationUri: String?

        public init(locationArn: String? = nil, locationUri: String? = nil) {
            self.locationArn = locationArn
            self.locationUri = locationUri
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
        }
    }

    public struct NfsMountOptions: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the NFS version that you want DataSync to use when mounting your NFS share. If the server refuses to use the version specified, the task fails. You can specify the following options:    AUTOMATIC (default): DataSync chooses NFS version 4.1.    NFS3: Stateless protocol version that allows for asynchronous writes on the server.    NFSv4_0: Stateful, firewall-friendly protocol version that supports delegations and pseudo file systems.    NFSv4_1: Stateful protocol version that supports sessions, directory delegations, and parallel data processing. NFS version 4.1 also includes all features available in version 4.0.    DataSync currently only supports NFS version 3 with Amazon FSx for NetApp ONTAP locations.
        public let version: NfsVersion?

        public init(version: NfsVersion? = nil) {
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case version = "Version"
        }
    }

    public struct OnPremConfig: AWSEncodableShape & AWSDecodableShape {
        /// ARNs of the agents to use for an NFS location.
        public let agentArns: [String]

        public init(agentArns: [String]) {
            self.agentArns = agentArns
        }

        public func validate(name: String) throws {
            try self.agentArns.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
        }
    }

    public struct Options: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether to preserve metadata indicating the last time a file was read or written to. If you set Atime to BEST_EFFORT, DataSync attempts to preserve the original Atime attribute on all source files (that is, the version before the PREPARING phase of the task execution).  The behavior of Atime isn't fully standard across platforms, so DataSync can only do this on a best-effort basis.  Default value: BEST_EFFORT   BEST_EFFORT: Attempt to preserve the per-file Atime value (recommended).  NONE: Ignore Atime.  If Atime is set to BEST_EFFORT, Mtime must be set to PRESERVE.  If Atime is set to NONE, Mtime must also be NONE.
        public let atime: Atime?
        /// Limits the bandwidth used by a DataSync task. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024).
        public let bytesPerSecond: Int64?
        /// Specifies the POSIX group ID (GID) of the file's owners. For more information, see Metadata copied by DataSync. Default value: INT_VALUE. This preserves the integer value of the ID.  INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended).  NONE: Ignore UID and GID.
        public let gid: Gid?
        /// Specifies the type of logs that DataSync publishes to a Amazon CloudWatch Logs log group. To specify the log group, see CloudWatchLogGroupArn. If you set LogLevel to OFF, no logs are published. BASIC publishes logs on errors for individual files transferred. TRANSFER publishes logs for every file or object that is transferred and integrity checked.
        public let logLevel: LogLevel?
        /// Specifies whether to preserve metadata indicating the last time that a file was written to before the PREPARING phase of your task execution. This option is required when you need to run the a task more than once. Default Value: PRESERVE   PRESERVE: Preserve original Mtime (recommended)  NONE: Ignore Mtime.   If Mtime is set to PRESERVE, Atime must be set to BEST_EFFORT. If Mtime is set to NONE, Atime must also be set to NONE.
        public let mtime: Mtime?
        /// Specifies whether object tags are preserved when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE value. Default Value: PRESERVE
        public let objectTags: ObjectTags?
        /// Specifies whether data at the destination location should be overwritten or preserved. If set to NEVER, a destination file for example will not be replaced by a source file (even if the destination file differs from the source file). If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.  Some storage classes have specific behaviors that can affect your Amazon S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync .
        public let overwriteMode: OverwriteMode?
        /// Specifies which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. For more information, see Metadata copied by DataSync. Default value: PRESERVE   PRESERVE: Preserve POSIX-style permissions (recommended).  NONE: Ignore permissions.   DataSync can preserve extant permissions of a source location.
        public let posixPermissions: PosixPermissions?
        /// Specifies whether files in the destination location that don't exist in the source should be preserved. This option can affect your Amazon S3 storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync . Default value: PRESERVE   PRESERVE: Ignore such destination files (recommended).   REMOVE: Delete destination files that aren’t present in the source.
        public let preserveDeletedFiles: PreserveDeletedFiles?
        /// Specifies whether DataSync should preserve the metadata of block and character devices in the source location and recreate the files with that device name and metadata on the destination. DataSync copies only the name and metadata of such devices.  DataSync can't copy the actual contents of these devices because they're nonterminal and don't return an end-of-file (EOF) marker.  Default value: NONE   NONE: Ignore special devices (recommended).   PRESERVE: Preserve character and block device metadata. This option currently isn't supported for Amazon EFS.
        public let preserveDevices: PreserveDevices?
        /// Specifies which components of the SMB security descriptor are copied from source to destination objects.  This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations or between two FSx for Windows File Server locations. For more information, see how DataSync handles metadata. Default value: OWNER_DACL   OWNER_DACL: For each copied object, DataSync copies the following metadata:   The object owner.   NTFS discretionary access control lists (DACLs), which determine whether to  grant access to an object. DataSync won't copy NTFS system access control lists (SACLs) with this option.    OWNER_DACL_SACL: For each copied object, DataSync copies the following metadata:   The object owner.   NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.   SACLs, which are used by administrators to log attempts to access a secured object. Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user.    NONE: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
        public let securityDescriptorCopyFlags: SmbSecurityDescriptorCopyFlags?
        /// Specifies whether tasks should be queued before executing the tasks. The default is ENABLED, which means the tasks will be queued. If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see  Queueing task executions.
        public let taskQueueing: TaskQueueing?
        /// Determines whether DataSync transfers only the data and metadata that differ between the source and the destination location or transfers all the content from the source (without comparing what's in the destination).  CHANGED: DataSync copies only data or metadata that is new or different content from the source location to the destination location.  ALL: DataSync copies all source location content to the destination (without comparing what's in the destination).
        public let transferMode: TransferMode?
        /// Specifies the POSIX user ID (UID) of the file's owner. For more information, see Metadata copied by DataSync. Default value: INT_VALUE. This preserves the integer value of the ID.  INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended).  NONE: Ignore UID and GID.
        public let uid: Uid?
        /// Specifies how and when DataSync  checks the integrity of your data during a transfer.  Default value: POINT_IN_TIME_CONSISTENT   ONLY_FILES_TRANSFERRED (recommended): DataSync calculates the checksum of transferred files and metadata at the source location. At the end of the transfer, DataSync then compares this checksum to the checksum calculated on those files at the destination. We recommend this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.  POINT_IN_TIME_CONSISTENT: At the end of the transfer, DataSync scans the entire source and destination to verify that both locations are fully synchronized. You can't use this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.  NONE: DataSync doesn't run additional verification at the end of the transfer. All data transmissions are still integrity-checked with checksum verification during the transfer.
        public let verifyMode: VerifyMode?

        public init(atime: Atime? = nil, bytesPerSecond: Int64? = nil, gid: Gid? = nil, logLevel: LogLevel? = nil, mtime: Mtime? = nil, objectTags: ObjectTags? = nil, overwriteMode: OverwriteMode? = nil, posixPermissions: PosixPermissions? = nil, preserveDeletedFiles: PreserveDeletedFiles? = nil, preserveDevices: PreserveDevices? = nil, securityDescriptorCopyFlags: SmbSecurityDescriptorCopyFlags? = nil, taskQueueing: TaskQueueing? = nil, transferMode: TransferMode? = nil, uid: Uid? = nil, verifyMode: VerifyMode? = nil) {
            self.atime = atime
            self.bytesPerSecond = bytesPerSecond
            self.gid = gid
            self.logLevel = logLevel
            self.mtime = mtime
            self.objectTags = objectTags
            self.overwriteMode = overwriteMode
            self.posixPermissions = posixPermissions
            self.preserveDeletedFiles = preserveDeletedFiles
            self.preserveDevices = preserveDevices
            self.securityDescriptorCopyFlags = securityDescriptorCopyFlags
            self.taskQueueing = taskQueueing
            self.transferMode = transferMode
            self.uid = uid
            self.verifyMode = verifyMode
        }

        public func validate(name: String) throws {
            try self.validate(self.bytesPerSecond, name: "bytesPerSecond", parent: name, min: -1)
        }

        private enum CodingKeys: String, CodingKey {
            case atime = "Atime"
            case bytesPerSecond = "BytesPerSecond"
            case gid = "Gid"
            case logLevel = "LogLevel"
            case mtime = "Mtime"
            case objectTags = "ObjectTags"
            case overwriteMode = "OverwriteMode"
            case posixPermissions = "PosixPermissions"
            case preserveDeletedFiles = "PreserveDeletedFiles"
            case preserveDevices = "PreserveDevices"
            case securityDescriptorCopyFlags = "SecurityDescriptorCopyFlags"
            case taskQueueing = "TaskQueueing"
            case transferMode = "TransferMode"
            case uid = "Uid"
            case verifyMode = "VerifyMode"
        }
    }

    public struct PrivateLinkConfig: AWSDecodableShape {
        /// The private endpoint that is configured for an agent that has access to IP addresses in a PrivateLink. An agent that is configured with this endpoint will not be accessible over the public internet.
        public let privateLinkEndpoint: String?
        /// The Amazon Resource Names (ARNs) of the security groups that are configured for the EC2 resource that hosts an agent activated in a VPC or an agent that has access to a VPC endpoint.
        public let securityGroupArns: [String]?
        /// The Amazon Resource Names (ARNs) of the subnets that are configured for an agent activated in a VPC or an agent that has access to a VPC endpoint.
        public let subnetArns: [String]?
        /// The ID of the VPC endpoint that is configured for an agent. An agent that is configured with a VPC endpoint will not be accessible over the public internet.
        public let vpcEndpointId: String?

        public init(privateLinkEndpoint: String? = nil, securityGroupArns: [String]? = nil, subnetArns: [String]? = nil, vpcEndpointId: String? = nil) {
            self.privateLinkEndpoint = privateLinkEndpoint
            self.securityGroupArns = securityGroupArns
            self.subnetArns = subnetArns
            self.vpcEndpointId = vpcEndpointId
        }

        private enum CodingKeys: String, CodingKey {
            case privateLinkEndpoint = "PrivateLinkEndpoint"
            case securityGroupArns = "SecurityGroupArns"
            case subnetArns = "SubnetArns"
            case vpcEndpointId = "VpcEndpointId"
        }
    }

    public struct QopConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The data transfer protection setting configured on the HDFS cluster. This setting corresponds to your dfs.data.transfer.protection setting in the hdfs-site.xml file on your Hadoop cluster.
        public let dataTransferProtection: HdfsDataTransferProtection?
        /// The RPC protection setting configured on the HDFS cluster. This setting corresponds to your hadoop.rpc.protection setting in your core-site.xml file on your Hadoop cluster.
        public let rpcProtection: HdfsRpcProtection?

        public init(dataTransferProtection: HdfsDataTransferProtection? = nil, rpcProtection: HdfsRpcProtection? = nil) {
            self.dataTransferProtection = dataTransferProtection
            self.rpcProtection = rpcProtection
        }

        private enum CodingKeys: String, CodingKey {
            case dataTransferProtection = "DataTransferProtection"
            case rpcProtection = "RpcProtection"
        }
    }

    public struct S3Config: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the IAM role for accessing the S3 bucket.
        public let bucketAccessRoleArn: String

        public init(bucketAccessRoleArn: String) {
            self.bucketAccessRoleArn = bucketAccessRoleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketAccessRoleArn, name: "bucketAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.bucketAccessRoleArn, name: "bucketAccessRoleArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):iam::[0-9]{12}:role/.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketAccessRoleArn = "BucketAccessRoleArn"
        }
    }

    public struct SmbMountOptions: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the SMB version that you want DataSync to use when mounting your SMB share. If you don't specify a version, DataSync defaults to AUTOMATIC and chooses a version based on negotiation with the SMB server.
        public let version: SmbVersion?

        public init(version: SmbVersion? = nil) {
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case version = "Version"
        }
    }

    public struct StartTaskExecutionRequest: AWSEncodableShape {
        /// Specifies a list of filter rules that determines which files to exclude from a task. The list contains a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2".
        public let excludes: [FilterRule]?
        /// Specifies a list of filter rules that determines which files to include when running a task. The pattern should contain a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2".
        public let includes: [FilterRule]?
        public let overrideOptions: Options?
        /// Specifies the tags that you want to apply to the Amazon Resource Name (ARN) representing the task execution.  Tags are key-value pairs that help you manage, filter, and search for your DataSync resources.
        public let tags: [TagListEntry]?
        /// Specifies the Amazon Resource Name (ARN) of the task that you want to start.
        public let taskArn: String

        public init(excludes: [FilterRule]? = nil, includes: [FilterRule]? = nil, overrideOptions: Options? = nil, tags: [TagListEntry]? = nil, taskArn: String) {
            self.excludes = excludes
            self.includes = includes
            self.overrideOptions = overrideOptions
            self.tags = tags
            self.taskArn = taskArn
        }

        public func validate(name: String) throws {
            try self.excludes?.forEach {
                try $0.validate(name: "\(name).excludes[]")
            }
            try self.validate(self.excludes, name: "excludes", parent: name, max: 1)
            try self.includes?.forEach {
                try $0.validate(name: "\(name).includes[]")
            }
            try self.validate(self.includes, name: "includes", parent: name, max: 1)
            try self.overrideOptions?.validate(name: "\(name).overrideOptions")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.taskArn, name: "taskArn", parent: name, max: 128)
            try self.validate(self.taskArn, name: "taskArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case excludes = "Excludes"
            case includes = "Includes"
            case overrideOptions = "OverrideOptions"
            case tags = "Tags"
            case taskArn = "TaskArn"
        }
    }

    public struct StartTaskExecutionResponse: AWSDecodableShape {
        /// The ARN of the running task execution.
        public let taskExecutionArn: String?

        public init(taskExecutionArn: String? = nil) {
            self.taskExecutionArn = taskExecutionArn
        }

        private enum CodingKeys: String, CodingKey {
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct TagListEntry: AWSEncodableShape & AWSDecodableShape {
        /// The key for an Amazon Web Services resource tag.
        public let key: String
        /// The value for an Amazon Web Services resource tag.
        public let value: String?

        public init(key: String, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 256)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:/-]+$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:@/-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// Specifies the Amazon Resource Name (ARN) of the resource to apply the tag to.
        public let resourceArn: String
        /// Specifies the tags that you want to apply to the resource.
        public let tags: [TagListEntry]

        public init(resourceArn: String, tags: [TagListEntry]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 128)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:(agent|task|location)/(agent|task|loc)-[a-f0-9]{17}(/execution/exec-[a-f0-9]{17})?$")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TaskExecutionListEntry: AWSDecodableShape {
        /// The status of a task execution.
        public let status: TaskExecutionStatus?
        /// The Amazon Resource Name (ARN) of the task that was executed.
        public let taskExecutionArn: String?

        public init(status: TaskExecutionStatus? = nil, taskExecutionArn: String? = nil) {
            self.status = status
            self.taskExecutionArn = taskExecutionArn
        }

        private enum CodingKeys: String, CodingKey {
            case status = "Status"
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct TaskExecutionResultDetail: AWSDecodableShape {
        /// Errors that DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.
        public let errorCode: String?
        /// Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues.
        public let errorDetail: String?
        /// The total time in milliseconds that DataSync spent in the PREPARING phase.
        public let prepareDuration: Int64?
        /// The status of the PREPARING phase.
        public let prepareStatus: PhaseStatus?
        /// The total time in milliseconds that DataSync took to transfer the file from the source to the destination location.
        public let totalDuration: Int64?
        /// The total time in milliseconds that DataSync spent in the TRANSFERRING phase.
        public let transferDuration: Int64?
        /// The status of the TRANSFERRING phase.
        public let transferStatus: PhaseStatus?
        /// The total time in milliseconds that DataSync spent in the VERIFYING phase.
        public let verifyDuration: Int64?
        /// The status of the VERIFYING phase.
        public let verifyStatus: PhaseStatus?

        public init(errorCode: String? = nil, errorDetail: String? = nil, prepareDuration: Int64? = nil, prepareStatus: PhaseStatus? = nil, totalDuration: Int64? = nil, transferDuration: Int64? = nil, transferStatus: PhaseStatus? = nil, verifyDuration: Int64? = nil, verifyStatus: PhaseStatus? = nil) {
            self.errorCode = errorCode
            self.errorDetail = errorDetail
            self.prepareDuration = prepareDuration
            self.prepareStatus = prepareStatus
            self.totalDuration = totalDuration
            self.transferDuration = transferDuration
            self.transferStatus = transferStatus
            self.verifyDuration = verifyDuration
            self.verifyStatus = verifyStatus
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorDetail = "ErrorDetail"
            case prepareDuration = "PrepareDuration"
            case prepareStatus = "PrepareStatus"
            case totalDuration = "TotalDuration"
            case transferDuration = "TransferDuration"
            case transferStatus = "TransferStatus"
            case verifyDuration = "VerifyDuration"
            case verifyStatus = "VerifyStatus"
        }
    }

    public struct TaskFilter: AWSEncodableShape {
        /// The name of the filter being used. Each API call supports a list of filters that are available for it. For example, LocationId for ListTasks.
        public let name: TaskFilterName
        /// The operator that is used to compare filter values (for example, Equals or  Contains).
        public let `operator`: Operator
        /// The values that you want to filter for. For example, you might want to display only tasks  for a specific destination location.
        public let values: [String]

        public init(name: TaskFilterName, operator: Operator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 255)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_\\ \\-\\:\\*\\.\\\\/\\?-]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case `operator` = "Operator"
            case values = "Values"
        }
    }

    public struct TaskListEntry: AWSDecodableShape {
        /// The name of the task.
        public let name: String?
        /// The status of the task.
        public let status: TaskStatus?
        /// The Amazon Resource Name (ARN) of the task.
        public let taskArn: String?

        public init(name: String? = nil, status: TaskStatus? = nil, taskArn: String? = nil) {
            self.name = name
            self.status = status
            self.taskArn = taskArn
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case status = "Status"
            case taskArn = "TaskArn"
        }
    }

    public struct TaskSchedule: AWSEncodableShape & AWSDecodableShape {
        /// A cron expression that specifies when DataSync initiates a scheduled transfer from a source to a destination location.
        public let scheduleExpression: String

        public init(scheduleExpression: String) {
            self.scheduleExpression = scheduleExpression
        }

        public func validate(name: String) throws {
            try self.validate(self.scheduleExpression, name: "scheduleExpression", parent: name, max: 256)
            try self.validate(self.scheduleExpression, name: "scheduleExpression", parent: name, pattern: "^[a-zA-Z0-9\\ \\_\\*\\?\\,\\|\\^\\-\\/\\#\\s\\(\\)\\+]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case scheduleExpression = "ScheduleExpression"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// Specifies the keys in the tags that you want to remove.
        public let keys: [String]
        /// Specifies the Amazon Resource Name (ARN) of the resource to remove the tags from.
        public let resourceArn: String

        public init(keys: [String], resourceArn: String) {
            self.keys = keys
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.keys.forEach {
                try validate($0, name: "keys[]", parent: name, max: 256)
                try validate($0, name: "keys[]", parent: name, min: 1)
                try validate($0, name: "keys[]", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:/-]+$")
            }
            try self.validate(self.keys, name: "keys", parent: name, max: 50)
            try self.validate(self.keys, name: "keys", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 128)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:(agent|task|location)/(agent|task|loc)-[a-f0-9]{17}(/execution/exec-[a-f0-9]{17})?$")
        }

        private enum CodingKeys: String, CodingKey {
            case keys = "Keys"
            case resourceArn = "ResourceArn"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAgentRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the agent to update.
        public let agentArn: String
        /// The name that you want to use to configure the agent.
        public let name: String?

        public init(agentArn: String, name: String? = nil) {
            self.agentArn = agentArn
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.agentArn, name: "agentArn", parent: name, max: 128)
            try self.validate(self.agentArn, name: "agentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:@/-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
            case name = "Name"
        }
    }

    public struct UpdateAgentResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateLocationHdfsRequest: AWSEncodableShape {
        /// The ARNs of the agents that are used to connect to the HDFS cluster.
        public let agentArns: [String]?
        /// The type of authentication used to determine the identity of the user.
        public let authenticationType: HdfsAuthenticationType?
        /// The size of the data blocks to write into the HDFS cluster.
        public let blockSize: Int?
        /// The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address. If you use the CLI, it performs base64 encoding for you. Otherwise, provide the base64-encoded text.
        public let kerberosKeytab: AWSBase64Data?
        /// The krb5.conf file that contains the Kerberos configuration information. You can load the krb5.conf file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.
        public let kerberosKrb5Conf: AWSBase64Data?
        /// The Kerberos principal with access to the files and folders on the HDFS cluster.
        public let kerberosPrincipal: String?
        /// The URI of the HDFS cluster's Key Management Server (KMS).
        public let kmsKeyProviderUri: String?
        /// The Amazon Resource Name (ARN) of the source HDFS cluster location.
        public let locationArn: String
        /// The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.
        public let nameNodes: [HdfsNameNode]?
        /// The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer privacy settings configured on the Hadoop Distributed File System (HDFS) cluster.
        public let qopConfiguration: QopConfiguration?
        /// The number of DataNodes to replicate the data to when writing to the HDFS cluster.
        public let replicationFactor: Int?
        /// The user name used to identify the client on the host operating system.
        public let simpleUser: String?
        /// A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster.
        public let subdirectory: String?

        public init(agentArns: [String]? = nil, authenticationType: HdfsAuthenticationType? = nil, blockSize: Int? = nil, kerberosKeytab: AWSBase64Data? = nil, kerberosKrb5Conf: AWSBase64Data? = nil, kerberosPrincipal: String? = nil, kmsKeyProviderUri: String? = nil, locationArn: String, nameNodes: [HdfsNameNode]? = nil, qopConfiguration: QopConfiguration? = nil, replicationFactor: Int? = nil, simpleUser: String? = nil, subdirectory: String? = nil) {
            self.agentArns = agentArns
            self.authenticationType = authenticationType
            self.blockSize = blockSize
            self.kerberosKeytab = kerberosKeytab
            self.kerberosKrb5Conf = kerberosKrb5Conf
            self.kerberosPrincipal = kerberosPrincipal
            self.kmsKeyProviderUri = kmsKeyProviderUri
            self.locationArn = locationArn
            self.nameNodes = nameNodes
            self.qopConfiguration = qopConfiguration
            self.replicationFactor = replicationFactor
            self.simpleUser = simpleUser
            self.subdirectory = subdirectory
        }

        public func validate(name: String) throws {
            try self.agentArns?.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
            try self.validate(self.blockSize, name: "blockSize", parent: name, max: 1_073_741_824)
            try self.validate(self.blockSize, name: "blockSize", parent: name, min: 1_048_576)
            try self.validate(self.kerberosKeytab, name: "kerberosKeytab", parent: name, max: 65536)
            try self.validate(self.kerberosKrb5Conf, name: "kerberosKrb5Conf", parent: name, max: 131_072)
            try self.validate(self.kerberosPrincipal, name: "kerberosPrincipal", parent: name, max: 256)
            try self.validate(self.kerberosPrincipal, name: "kerberosPrincipal", parent: name, min: 1)
            try self.validate(self.kerberosPrincipal, name: "kerberosPrincipal", parent: name, pattern: "^.+$")
            try self.validate(self.kmsKeyProviderUri, name: "kmsKeyProviderUri", parent: name, max: 255)
            try self.validate(self.kmsKeyProviderUri, name: "kmsKeyProviderUri", parent: name, min: 1)
            try self.validate(self.kmsKeyProviderUri, name: "kmsKeyProviderUri", parent: name, pattern: "^kms:\\/\\/http[s]?@(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9])(;(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9]))*:[0-9]{1,5}\\/kms$")
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
            try self.nameNodes?.forEach {
                try $0.validate(name: "\(name).nameNodes[]")
            }
            try self.validate(self.nameNodes, name: "nameNodes", parent: name, min: 1)
            try self.validate(self.replicationFactor, name: "replicationFactor", parent: name, max: 512)
            try self.validate(self.replicationFactor, name: "replicationFactor", parent: name, min: 1)
            try self.validate(self.simpleUser, name: "simpleUser", parent: name, max: 256)
            try self.validate(self.simpleUser, name: "simpleUser", parent: name, min: 1)
            try self.validate(self.simpleUser, name: "simpleUser", parent: name, pattern: "^[_.A-Za-z0-9][-_.A-Za-z0-9]*$")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case authenticationType = "AuthenticationType"
            case blockSize = "BlockSize"
            case kerberosKeytab = "KerberosKeytab"
            case kerberosKrb5Conf = "KerberosKrb5Conf"
            case kerberosPrincipal = "KerberosPrincipal"
            case kmsKeyProviderUri = "KmsKeyProviderUri"
            case locationArn = "LocationArn"
            case nameNodes = "NameNodes"
            case qopConfiguration = "QopConfiguration"
            case replicationFactor = "ReplicationFactor"
            case simpleUser = "SimpleUser"
            case subdirectory = "Subdirectory"
        }
    }

    public struct UpdateLocationHdfsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateLocationNfsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the NFS location to update.
        public let locationArn: String
        public let mountOptions: NfsMountOptions?
        public let onPremConfig: OnPremConfig?
        /// The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination. The NFS path should be a path that's exported by the NFS server, or a subdirectory of that path. The path should be such that it can be mounted by other NFS clients in your network. To see all the paths exported by your NFS server, run "showmount -e nfs-server-name" from an NFS client that has access to your server. You can specify any directory that appears in the results, and any subdirectory of that directory. Ensure that the NFS export is accessible without Kerberos authentication.  To transfer all the data in the folder that you specified, DataSync must have permissions to read all the data. To ensure this, either configure the NFS export with no_root_squash, or ensure that the files you want DataSync to access have permissions that allow read access for all users. Doing either option enables the agent to read the files. For the agent to access directories, you must additionally enable all execute access. If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information. For information about NFS export configuration, see 18.7. The /etc/exports Configuration File in the Red Hat Enterprise Linux documentation.
        public let subdirectory: String?

        public init(locationArn: String, mountOptions: NfsMountOptions? = nil, onPremConfig: OnPremConfig? = nil, subdirectory: String? = nil) {
            self.locationArn = locationArn
            self.mountOptions = mountOptions
            self.onPremConfig = onPremConfig
            self.subdirectory = subdirectory
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
            try self.onPremConfig?.validate(name: "\(name).onPremConfig")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\p{Zs}]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
            case mountOptions = "MountOptions"
            case onPremConfig = "OnPremConfig"
            case subdirectory = "Subdirectory"
        }
    }

    public struct UpdateLocationNfsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateLocationObjectStorageRequest: AWSEncodableShape {
        /// Specifies the access key (for example, a user name) if credentials are required to authenticate with the object storage server.
        public let accessKey: String?
        /// Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can securely connect with your location.
        public let agentArns: [String]?
        /// Specifies the ARN of the object storage system location that you're updating.
        public let locationArn: String
        /// Specifies the secret key (for example, a password) if credentials are required to authenticate with the object storage server.
        public let secretKey: String?
        /// Specifies a certificate to authenticate with an object storage system that uses a private or self-signed certificate authority (CA). You must specify a Base64-encoded .pem file (for example, file:///home/user/.ssh/storage_sys_certificate.pem). The certificate can be up to 32768 bytes (before Base64 encoding). To use this parameter, configure ServerProtocol to HTTPS. Updating the certificate doesn't interfere with tasks that you have in progress.
        public let serverCertificate: AWSBase64Data?
        /// Specifies the port that your object storage server accepts inbound network traffic on (for example, port 443).
        public let serverPort: Int?
        /// Specifies the protocol that your object storage server uses to communicate.
        public let serverProtocol: ObjectStorageServerProtocol?
        /// Specifies the object prefix for your object storage server. If this is a source location, DataSync only copies objects with this prefix. If this is a destination location, DataSync writes all objects with this prefix.
        public let subdirectory: String?

        public init(accessKey: String? = nil, agentArns: [String]? = nil, locationArn: String, secretKey: String? = nil, serverCertificate: AWSBase64Data? = nil, serverPort: Int? = nil, serverProtocol: ObjectStorageServerProtocol? = nil, subdirectory: String? = nil) {
            self.accessKey = accessKey
            self.agentArns = agentArns
            self.locationArn = locationArn
            self.secretKey = secretKey
            self.serverCertificate = serverCertificate
            self.serverPort = serverPort
            self.serverProtocol = serverProtocol
            self.subdirectory = subdirectory
        }

        public func validate(name: String) throws {
            try self.validate(self.accessKey, name: "accessKey", parent: name, max: 200)
            try self.validate(self.accessKey, name: "accessKey", parent: name, min: 8)
            try self.validate(self.accessKey, name: "accessKey", parent: name, pattern: "^.+$")
            try self.agentArns?.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
            try self.validate(self.secretKey, name: "secretKey", parent: name, max: 200)
            try self.validate(self.secretKey, name: "secretKey", parent: name, min: 8)
            try self.validate(self.secretKey, name: "secretKey", parent: name, pattern: "^.+$")
            try self.validate(self.serverCertificate, name: "serverCertificate", parent: name, max: 32768)
            try self.validate(self.serverPort, name: "serverPort", parent: name, max: 65536)
            try self.validate(self.serverPort, name: "serverPort", parent: name, min: 1)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\p{Zs}]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessKey = "AccessKey"
            case agentArns = "AgentArns"
            case locationArn = "LocationArn"
            case secretKey = "SecretKey"
            case serverCertificate = "ServerCertificate"
            case serverPort = "ServerPort"
            case serverProtocol = "ServerProtocol"
            case subdirectory = "Subdirectory"
        }
    }

    public struct UpdateLocationObjectStorageResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateLocationSmbRequest: AWSEncodableShape {
        /// The Amazon Resource Names (ARNs) of agents to use for a Simple Message Block (SMB) location.
        public let agentArns: [String]?
        /// The name of the Windows domain that the SMB server belongs to.
        public let domain: String?
        /// The Amazon Resource Name (ARN) of the SMB location to update.
        public let locationArn: String
        public let mountOptions: SmbMountOptions?
        /// The password of the user who can mount the share has the permissions to access files and folders in the SMB share.
        public let password: String?
        /// The subdirectory in the SMB file system that is used to read data from the SMB source location or write data to the SMB destination. The SMB path should be a path that's exported by the SMB server, or a subdirectory of that path. The path should be such that it can be mounted by other SMB clients in your network.   Subdirectory must be specified with forward slashes. For example, /path/to/folder.  To transfer all the data in the folder that you specified, DataSync must have permissions to mount the SMB share and to access all the data in that share. To ensure this, do either of the following:   Ensure that the user/password specified belongs to the user who can mount the share and who has the appropriate permissions for all of the files and directories that you want DataSync to access.   Use credentials of a member of the Backup Operators group to mount the share.    Doing either of these options enables the agent to access the data. For the agent to access directories, you must also enable all execute access.
        public let subdirectory: String?
        /// The user who can mount the share has the permissions to access files and folders in the SMB share.
        public let user: String?

        public init(agentArns: [String]? = nil, domain: String? = nil, locationArn: String, mountOptions: SmbMountOptions? = nil, password: String? = nil, subdirectory: String? = nil, user: String? = nil) {
            self.agentArns = agentArns
            self.domain = domain
            self.locationArn = locationArn
            self.mountOptions = mountOptions
            self.password = password
            self.subdirectory = subdirectory
            self.user = user
        }

        public func validate(name: String) throws {
            try self.agentArns?.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, max: 253)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[A-Za-z0-9]((\\.|-+)?[A-Za-z0-9]){0,252}$")
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
            try self.validate(self.password, name: "password", parent: name, max: 104)
            try self.validate(self.password, name: "password", parent: name, pattern: "^.{0,104}$")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$")
            try self.validate(self.user, name: "user", parent: name, max: 104)
            try self.validate(self.user, name: "user", parent: name, pattern: "^[^\\x5B\\x5D\\\\/:;|=,+*?]{1,104}$")
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case domain = "Domain"
            case locationArn = "LocationArn"
            case mountOptions = "MountOptions"
            case password = "Password"
            case subdirectory = "Subdirectory"
            case user = "User"
        }
    }

    public struct UpdateLocationSmbResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateTaskExecutionRequest: AWSEncodableShape {
        public let options: Options
        /// The Amazon Resource Name (ARN) of the specific task execution that is being updated.
        public let taskExecutionArn: String

        public init(options: Options, taskExecutionArn: String) {
            self.options = options
            self.taskExecutionArn = taskExecutionArn
        }

        public func validate(name: String) throws {
            try self.options.validate(name: "\(name).options")
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, max: 128)
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}/execution/exec-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct UpdateTaskExecutionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateTaskRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource name of the Amazon CloudWatch log group.
        public let cloudWatchLogGroupArn: String?
        /// Specifies a list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
        public let excludes: [FilterRule]?
        /// Specifies a list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
        public let includes: [FilterRule]?
        /// The name of the task to update.
        public let name: String?
        public let options: Options?
        /// Specifies a schedule used to periodically transfer files from a source to a destination location. You can configure your task to execute hourly, daily, weekly or on specific days of the week. You control when in the day or hour you want the task to execute. The time you specify is UTC time. For more information, see Scheduling your task.
        public let schedule: TaskSchedule?
        /// The Amazon Resource Name (ARN) of the resource name of the task to update.
        public let taskArn: String

        public init(cloudWatchLogGroupArn: String? = nil, excludes: [FilterRule]? = nil, includes: [FilterRule]? = nil, name: String? = nil, options: Options? = nil, schedule: TaskSchedule? = nil, taskArn: String) {
            self.cloudWatchLogGroupArn = cloudWatchLogGroupArn
            self.excludes = excludes
            self.includes = includes
            self.name = name
            self.options = options
            self.schedule = schedule
            self.taskArn = taskArn
        }

        public func validate(name: String) throws {
            try self.validate(self.cloudWatchLogGroupArn, name: "cloudWatchLogGroupArn", parent: name, max: 562)
            try self.validate(self.cloudWatchLogGroupArn, name: "cloudWatchLogGroupArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):logs:[a-z\\-0-9]*:[0-9]{12}:log-group:([^:\\*]*)(:\\*)?$")
            try self.excludes?.forEach {
                try $0.validate(name: "\(name).excludes[]")
            }
            try self.validate(self.excludes, name: "excludes", parent: name, max: 1)
            try self.includes?.forEach {
                try $0.validate(name: "\(name).includes[]")
            }
            try self.validate(self.includes, name: "includes", parent: name, max: 1)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:@/-]+$")
            try self.options?.validate(name: "\(name).options")
            try self.schedule?.validate(name: "\(name).schedule")
            try self.validate(self.taskArn, name: "taskArn", parent: name, max: 128)
            try self.validate(self.taskArn, name: "taskArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogGroupArn = "CloudWatchLogGroupArn"
            case excludes = "Excludes"
            case includes = "Includes"
            case name = "Name"
            case options = "Options"
            case schedule = "Schedule"
            case taskArn = "TaskArn"
        }
    }

    public struct UpdateTaskResponse: AWSDecodableShape {
        public init() {}
    }
}

// MARK: - Errors

/// Error enum for DataSync
public struct DataSyncErrorType: AWSErrorType {
    enum Code: String {
        case internalException = "InternalException"
        case invalidRequestException = "InvalidRequestException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize DataSync
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// This exception is thrown when an error occurs in the DataSync service.
    public static var internalException: Self { .init(.internalException) }
    /// This exception is thrown when the client submits a malformed request.
    public static var invalidRequestException: Self { .init(.invalidRequestException) }
}

extension DataSyncErrorType: Equatable {
    public static func == (lhs: DataSyncErrorType, rhs: DataSyncErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension DataSyncErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
